REVO target.c corrections.
This commit is contained in:
parent
58d310b208
commit
37daed3054
|
@ -22,28 +22,28 @@
|
||||||
#include "drivers/pwm_mapping.h"
|
#include "drivers/pwm_mapping.h"
|
||||||
|
|
||||||
const uint16_t multiPPM[] = {
|
const uint16_t multiPPM[] = {
|
||||||
PWM6 | (MAP_TO_PPM_INPUT << 8), // PPM input
|
PWM6 | (MAP_TO_PPM_INPUT << 8), // PPM input
|
||||||
PWM7 | (MAP_TO_MOTOR_OUTPUT << 8), // Swap to servo if needed
|
PWM7 | (MAP_TO_MOTOR_OUTPUT << 8), // Swap to servo if needed
|
||||||
PWM8 | (MAP_TO_MOTOR_OUTPUT << 8), // Swap to servo if needed
|
PWM8 | (MAP_TO_MOTOR_OUTPUT << 8), // Swap to servo if needed
|
||||||
PWM9 | (MAP_TO_MOTOR_OUTPUT << 8),
|
PWM9 | (MAP_TO_MOTOR_OUTPUT << 8),
|
||||||
PWM10 | (MAP_TO_MOTOR_OUTPUT << 8),
|
PWM10 | (MAP_TO_MOTOR_OUTPUT << 8),
|
||||||
PWM11 | (MAP_TO_MOTOR_OUTPUT << 8),
|
PWM11 | (MAP_TO_MOTOR_OUTPUT << 8),
|
||||||
PWM12 | (MAP_TO_MOTOR_OUTPUT << 8),
|
PWM12 | (MAP_TO_MOTOR_OUTPUT << 8),
|
||||||
PWM2 | (MAP_TO_MOTOR_OUTPUT << 8), // Swap to servo if needed
|
PWM2 | (MAP_TO_MOTOR_OUTPUT << 8), // Swap to servo if needed
|
||||||
PWM3 | (MAP_TO_MOTOR_OUTPUT << 8), // Swap to servo if needed
|
PWM3 | (MAP_TO_MOTOR_OUTPUT << 8), // Swap to servo if needed
|
||||||
PWM4 | (MAP_TO_MOTOR_OUTPUT << 8), // Swap to servo if needed
|
PWM4 | (MAP_TO_MOTOR_OUTPUT << 8), // Swap to servo if needed
|
||||||
PWM5 | (MAP_TO_MOTOR_OUTPUT << 8), // Swap to servo if needed
|
PWM5 | (MAP_TO_MOTOR_OUTPUT << 8), // Swap to servo if needed
|
||||||
PWM1 | (MAP_TO_MOTOR_OUTPUT << 8), // Swap to servo if needed
|
PWM1 | (MAP_TO_MOTOR_OUTPUT << 8), // Swap to servo if needed
|
||||||
0xFFFF
|
0xFFFF
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint16_t multiPWM[] = {
|
const uint16_t multiPWM[] = {
|
||||||
PWM1 | (MAP_TO_PWM_INPUT << 8), // input #1
|
PWM1 | (MAP_TO_PWM_INPUT << 8), // input #1
|
||||||
PWM2 | (MAP_TO_PWM_INPUT << 8),
|
PWM2 | (MAP_TO_PWM_INPUT << 8),
|
||||||
PWM3 | (MAP_TO_PWM_INPUT << 8),
|
PWM3 | (MAP_TO_PWM_INPUT << 8),
|
||||||
PWM4 | (MAP_TO_PWM_INPUT << 8),
|
PWM4 | (MAP_TO_PWM_INPUT << 8),
|
||||||
PWM5 | (MAP_TO_PWM_INPUT << 8),
|
PWM5 | (MAP_TO_PWM_INPUT << 8),
|
||||||
PWM6 | (MAP_TO_PWM_INPUT << 8), // input #6
|
PWM6 | (MAP_TO_PWM_INPUT << 8), // input #6
|
||||||
PWM7 | (MAP_TO_MOTOR_OUTPUT << 8), // motor #1 or servo #1 (swap to servo if needed)
|
PWM7 | (MAP_TO_MOTOR_OUTPUT << 8), // motor #1 or servo #1 (swap to servo if needed)
|
||||||
PWM8 | (MAP_TO_MOTOR_OUTPUT << 8), // motor #2 or servo #2 (swap to servo if needed)
|
PWM8 | (MAP_TO_MOTOR_OUTPUT << 8), // motor #2 or servo #2 (swap to servo if needed)
|
||||||
PWM9 | (MAP_TO_MOTOR_OUTPUT << 8), // motor #1 or #3
|
PWM9 | (MAP_TO_MOTOR_OUTPUT << 8), // motor #1 or #3
|
||||||
|
@ -54,7 +54,7 @@ const uint16_t multiPWM[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint16_t airPPM[] = {
|
const uint16_t airPPM[] = {
|
||||||
PWM6 | (MAP_TO_PPM_INPUT << 8), // PPM input
|
PWM6 | (MAP_TO_PPM_INPUT << 8), // PPM input
|
||||||
PWM7 | (MAP_TO_MOTOR_OUTPUT << 8),
|
PWM7 | (MAP_TO_MOTOR_OUTPUT << 8),
|
||||||
PWM8 | (MAP_TO_MOTOR_OUTPUT << 8),
|
PWM8 | (MAP_TO_MOTOR_OUTPUT << 8),
|
||||||
PWM9 | (MAP_TO_SERVO_OUTPUT << 8),
|
PWM9 | (MAP_TO_SERVO_OUTPUT << 8),
|
||||||
|
@ -70,12 +70,12 @@ const uint16_t airPPM[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint16_t airPWM[] = {
|
const uint16_t airPWM[] = {
|
||||||
PWM1 | (MAP_TO_PWM_INPUT << 8), // input #1
|
PWM1 | (MAP_TO_PWM_INPUT << 8), // input #1
|
||||||
PWM2 | (MAP_TO_PWM_INPUT << 8),
|
PWM2 | (MAP_TO_PWM_INPUT << 8),
|
||||||
PWM3 | (MAP_TO_PWM_INPUT << 8),
|
PWM3 | (MAP_TO_PWM_INPUT << 8),
|
||||||
PWM4 | (MAP_TO_PWM_INPUT << 8),
|
PWM4 | (MAP_TO_PWM_INPUT << 8),
|
||||||
PWM5 | (MAP_TO_PWM_INPUT << 8),
|
PWM5 | (MAP_TO_PWM_INPUT << 8),
|
||||||
PWM6 | (MAP_TO_PWM_INPUT << 8), // input #6
|
PWM6 | (MAP_TO_PWM_INPUT << 8), // input #6
|
||||||
PWM7 | (MAP_TO_MOTOR_OUTPUT << 8), // motor #1
|
PWM7 | (MAP_TO_MOTOR_OUTPUT << 8), // motor #1
|
||||||
PWM8 | (MAP_TO_MOTOR_OUTPUT << 8), // motor #2
|
PWM8 | (MAP_TO_MOTOR_OUTPUT << 8), // motor #2
|
||||||
PWM9 | (MAP_TO_SERVO_OUTPUT << 8), // servo #1
|
PWM9 | (MAP_TO_SERVO_OUTPUT << 8), // servo #1
|
||||||
|
@ -85,21 +85,17 @@ const uint16_t airPWM[] = {
|
||||||
0xFFFF
|
0xFFFF
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
|
const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
|
||||||
{ TIM12, IO_TAG(PB14), TIM_Channel_1, TIM8_BRK_TIM12_IRQn, IOCFG_IPD, GPIO_Mode_AF, GPIO_AF_TIM12 }, // PPM (5th pin on FlexiIO port)
|
{ TIM12, IO_TAG(PB14), TIM_Channel_1, TIM8_BRK_TIM12_IRQn, 0, IOCFG_IPD, GPIO_AF_TIM12 }, // PPM (5th pin on FlexiIO port)
|
||||||
{ TIM12, IO_TAG(PB15), TIM_Channel_2, TIM8_BRK_TIM12_IRQn, IOCFG_IPD, GPIO_Mode_AF, GPIO_AF_TIM12 }, // S2_IN - GPIO_PartialRemap_TIM3
|
{ TIM12, IO_TAG(PB15), TIM_Channel_2, TIM8_BRK_TIM12_IRQn, 0, IOCFG_IPD, GPIO_AF_TIM12 }, // S2_IN - GPIO_PartialRemap_TIM3
|
||||||
{ TIM8, IO_TAG(PC6), TIM_Channel_1, TIM8_CC_IRQn, IOCFG_IPD, GPIO_Mode_AF, GPIO_AF_TIM8 }, // S3_IN
|
{ TIM8, IO_TAG(PC6), TIM_Channel_1, TIM8_CC_IRQn, 0, IOCFG_IPD, GPIO_AF_TIM8 }, // S3_IN
|
||||||
{ TIM8, IO_TAG(PC7), TIM_Channel_2, TIM8_CC_IRQn, IOCFG_IPD, GPIO_Mode_AF, GPIO_AF_TIM8 }, // S4_IN
|
{ TIM8, IO_TAG(PC7), TIM_Channel_2, TIM8_CC_IRQn, 0, IOCFG_IPD, GPIO_AF_TIM8 }, // S4_IN
|
||||||
{ TIM8, IO_TAG(PC8), TIM_Channel_3, TIM8_CC_IRQn, IOCFG_IPD, GPIO_Mode_AF, GPIO_AF_TIM8 }, // S5_IN
|
{ TIM8, IO_TAG(PC8), TIM_Channel_3, TIM8_CC_IRQn, 0, IOCFG_IPD, GPIO_AF_TIM8 }, // S5_IN
|
||||||
{ TIM8, IO_TAG(PC9), TIM_Channel_4, TIM8_CC_IRQn, IOCFG_IPD, GPIO_Mode_AF, GPIO_AF_TIM8 }, // S6_IN
|
{ TIM8, IO_TAG(PC9), TIM_Channel_4, TIM8_CC_IRQn, 0, IOCFG_IPD, GPIO_AF_TIM8 }, // S6_IN
|
||||||
|
{ TIM3, IO_TAG(PB0), TIM_Channel_3, TIM3_IRQn, 1, IOCFG_AF_PP_PD, GPIO_AF_TIM3 }, // S1_OUT
|
||||||
{ TIM3, IO_TAG(PB0), TIM_Channel_3, TIM3_IRQn, IOCFG_AF_PP_PD, GPIO_Mode_AF, GPIO_AF_TIM3 }, // S1_OUT
|
{ TIM3, IO_TAG(PB1), TIM_Channel_4, TIM3_IRQn, 1, IOCFG_AF_PP_PD, GPIO_AF_TIM3 }, // S2_OUT
|
||||||
{ TIM3, IO_TAG(PB1), TIM_Channel_4, TIM3_IRQn, IOCFG_AF_PP_PD, GPIO_Mode_AF, GPIO_AF_TIM3 }, // S2_OUT
|
{ TIM9, IO_TAG(PA3), TIM_Channel_2, TIM1_BRK_TIM9_IRQn, 1, IOCFG_AF_PP_PD, GPIO_AF_TIM9 }, // S3_OUT
|
||||||
{ TIM9, IO_TAG(PA3), TIM_Channel_2, TIM1_BRK_TIM9_IRQn, IOCFG_AF_PP_PD, GPIO_Mode_AF, GPIO_AF_TIM9 }, // S3_OUT
|
{ TIM2, IO_TAG(PA2), TIM_Channel_3, TIM2_IRQn, 1, IOCFG_AF_PP_PD, GPIO_AF_TIM2 }, // S4_OUT
|
||||||
{ TIM2, IO_TAG(PA2), TIM_Channel_3, TIM2_IRQn, IOCFG_AF_PP_PD, GPIO_Mode_AF, GPIO_AF_TIM2 }, // S4_OUT
|
{ TIM5, IO_TAG(PA1), TIM_Channel_2, TIM5_IRQn, 1, IOCFG_AF_PP_PD, GPIO_AF_TIM5 }, // S5_OUT - GPIO_PartialRemap_TIM3
|
||||||
{ TIM5, IO_TAG(PA1), TIM_Channel_2, TIM5_IRQn, IOCFG_AF_PP_PD, GPIO_Mode_AF, GPIO_AF_TIM5 }, // S5_OUT - GPIO_PartialRemap_TIM3
|
{ TIM5, IO_TAG(PA0), TIM_Channel_1, TIM5_IRQn, 1, IOCFG_AF_PP_PD, GPIO_AF_TIM5 }, // S6_OUT
|
||||||
{ TIM5, IO_TAG(PA0), TIM_Channel_1, TIM5_IRQn, IOCFG_AF_PP_PD, GPIO_Mode_AF, GPIO_AF_TIM5 }, // S6_OUT
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue