1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 20:35:33 +03:00

CC3D - Support PPM input on IN_S1.

This required timer overflow events to be used in the calculation of PPM
channel data.

CC3D tested, other targets may be unstable as a result. Needs further
testing.
This commit is contained in:
Dominic Clifton 2014-07-22 21:29:00 +01:00
parent 440e942af4
commit a5ec1355d4
6 changed files with 69 additions and 34 deletions

View file

@ -70,7 +70,7 @@ enum {
TYPE_S,
};
#if USABLE_TIMER_CHANNEL_COUNT >= 14
#if defined(NAZE) || defined(OLIMEXINO) || defined(NAZE32PRO) || defined(STM32F3DISCOVERY)
static const uint16_t multiPPM[] = {
PWM1 | (TYPE_IP << 8), // PPM input
PWM9 | (TYPE_M << 8), // Swap to servo if needed
@ -138,17 +138,7 @@ static const uint16_t airPWM[] = {
};
#endif
#if USABLE_TIMER_CHANNEL_COUNT == 12
#ifdef CC3D // XXX HACK while PPM and MOTOR code conflicts.
static const uint16_t multiPPM[] = {
PWM6 | (TYPE_IP << 8), // PPM input
PWM7 | (TYPE_M << 8), // Swap to servo if needed
PWM8 | (TYPE_M << 8), // Swap to servo if needed
PWM9 | (TYPE_M << 8),
PWM10 | (TYPE_M << 8),
0xFFFF
};
#else
#ifdef CC3D
static const uint16_t multiPPM[] = {
PWM1 | (TYPE_IP << 8), // PPM input
PWM7 | (TYPE_M << 8), // Swap to servo if needed
@ -164,7 +154,6 @@ static const uint16_t multiPPM[] = {
PWM6 | (TYPE_M << 8), // Swap to servo if needed
0xFFFF
};
#endif
static const uint16_t multiPWM[] = {
PWM1 | (TYPE_IW << 8), // input #1
PWM2 | (TYPE_IW << 8),