Remap to new timer mapping macro
This commit is contained in:
parent
c9330f75b0
commit
f35afc4586
|
@ -40,6 +40,7 @@
|
|||
#define DEF_TIM_DMA__TIM1_CH1 DMA1_CH2
|
||||
#define DEF_TIM_DMA__TIM1_CH2 DMA1_CH3
|
||||
#define DEF_TIM_DMA__TIM1_CH4 DMA1_CH4
|
||||
#define DEF_TIM_DMA__TIM1_CH1N DMA1_CH2
|
||||
#define DEF_TIM_DMA__TIM1_TRIG DMA1_CH4
|
||||
#define DEF_TIM_DMA__TIM1_COM DMA1_CH4
|
||||
#define DEF_TIM_DMA__TIM1_UP DMA1_CH5
|
||||
|
|
|
@ -20,20 +20,20 @@
|
|||
|
||||
#include <platform.h>
|
||||
#include "drivers/io.h"
|
||||
|
||||
#include "drivers/timer.h"
|
||||
#include "drivers/timer_def.h"
|
||||
#include "drivers/dma.h"
|
||||
|
||||
const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
|
||||
{ TIM4, IO_TAG(PB7), TIM_Channel_2, TIM_USE_PPM, TIMER_INPUT_ENABLED, GPIO_AF_2, NULL, 0 }, // RC PPM - PB7 - TIM17_CH1N AF1, TIM4_CH2 AF2, TIM8_BKIN AF5, TIM3_CH4 AF10
|
||||
|
||||
{ TIM16, IO_TAG(PA6), TIM_Channel_1, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED, GPIO_AF_1, DMA1_Channel6, DMA1_CH6_HANDLER }, // PWM1 - PA6 - TIM3_CH1 AF2, TIM8_BKIN AF4, TIM1_BKIN AF6, *TIM16_CH1 AF1
|
||||
{ TIM1, IO_TAG(PA7), TIM_Channel_1, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED | TIMER_OUTPUT_N_CHANNEL | TIMER_OUTPUT_INVERTED, GPIO_AF_6, DMA1_Channel2, DMA1_CH2_HANDLER }, // PWM2 - PA7 - TIM3_CH2 AF2, TIM8_CH1 AF4, TIM1_CH1N AF6, *TIM17_CH1 AF1
|
||||
{ TIM8, IO_TAG(PB8), TIM_Channel_2, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED, GPIO_AF_10,DMA2_Channel5, DMA2_CH5_HANDLER }, // PWM3 - PB8 - TIM16_CH1 AF1, TIM4_CH3 AF2, TIM8_CH2 AF10, TIM1_BKIN AF12
|
||||
{ TIM17, IO_TAG(PB9), TIM_Channel_1, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED, GPIO_AF_1, DMA1_Channel7, DMA1_CH7_HANDLER }, // PWM4 - PB9 - TIM17_CH1 AF1, TIM4_CH4 AF2, TIM8_CH3 AF10
|
||||
{ TIM3, IO_TAG(PB0), TIM_Channel_3, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED, GPIO_AF_2, NULL, 0 }, // SOFTSERIAL RX - TIM3_CH3 AF2, TIM8_CH2N AF4, TIM1_CH2N AF6
|
||||
{ TIM3, IO_TAG(PB1), TIM_Channel_4, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED, GPIO_AF_2, NULL, 0 }, // SOFTSERIAL TX - TIM3_CH4 AF2, TIM8_CH3N AF4, TIM1_CH3N AF6
|
||||
{ TIM2, IO_TAG(PA0), TIM_Channel_1, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED, GPIO_AF_1, NULL, 0 }, // PWM6 - PA0 - TIM2_CH1 AF1, TIM8_BKIN AF9, TIM8_ETR AF10
|
||||
{ TIM15, IO_TAG(PA2), TIM_Channel_1, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED, GPIO_AF_9, NULL, 0 }, // PWM7 - PA2 - TIM2_CH3 AF1, TIM15_CH1 AF9
|
||||
|
||||
{ TIM1, IO_TAG(PA8), TIM_Channel_1, TIM_USE_LED, TIMER_OUTPUT_ENABLED, GPIO_AF_6, DMA1_Channel2, DMA1_CH2_HANDLER }, // GPIO_TIMER / LED_STRIP --requires resource remap with dshot--
|
||||
DEF_TIM(TIM4, CH2, PB7, TIM_USE_PPM, TIMER_INPUT_ENABLED), // PPM IN
|
||||
DEF_TIM(TIM16,CH1, PA6, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED), // PWM1
|
||||
DEF_TIM(TIM1, CH1N,PA7, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED | TIMER_OUTPUT_INVERTED), // PWM2
|
||||
DEF_TIM(TIM8, CH2, PB8, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED), // PWM3
|
||||
DEF_TIM(TIM17,CH1, PB9, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED), // PWM4
|
||||
DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED), // PWM5
|
||||
DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED), // PWM6
|
||||
DEF_TIM(TIM2, CH1, PA0, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED), // PWM7
|
||||
DEF_TIM(TIM15,CH1, PA2, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED), // PWM8
|
||||
DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR | TIM_USE_LED, TIMER_OUTPUT_ENABLED), // LED_STRIP --requires resource remap with dshot (remap to motor 5??)--
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue