From a3fad7e6401086f8c28ece492672b10a89776737 Mon Sep 17 00:00:00 2001 From: jflyper Date: Wed, 29 Mar 2017 11:59:54 +0900 Subject: [PATCH 1/2] AIRBOTF4SD Add PB6 as LED strip (with pad) --- src/main/target/REVO/target.c | 6 +++++- src/main/target/REVO/target.h | 7 +++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/main/target/REVO/target.c b/src/main/target/REVO/target.c index e7a643fd2..92feda1bd 100644 --- a/src/main/target/REVO/target.c +++ b/src/main/target/REVO/target.c @@ -37,8 +37,12 @@ const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { DEF_TIM(TIM2, CH3, PA2, TIM_USE_MOTOR, 1, 0), // S4_OUT D1_ST1 #ifdef REVOLT DEF_TIM(TIM4, CH1, PB6, TIM_USE_LED, 0, 0), // LED for REVOLT D1_ST0 +#elif defined(AIRBOTF4SD) + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 1, 0), // S5_OUT + DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 1, 0), // S6_OUT + DEF_TIM(TIM4, CH1, PB6, TIM_USE_LED, 0, 0), // LED D1_ST0 #else - DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR | TIM_USE_LED, 1, 0), // S5_OUT / LED for REVO D1_ST4 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR | TIM_USE_LED, 1, 0), // S5_OUT / LED #ifdef AIRBOTF4 DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 1, 0), // S6_OUT #else diff --git a/src/main/target/REVO/target.h b/src/main/target/REVO/target.h index 665cc54ff..4610ff1ff 100644 --- a/src/main/target/REVO/target.h +++ b/src/main/target/REVO/target.h @@ -252,9 +252,12 @@ #ifdef REVOLT #define USABLE_TIMER_CHANNEL_COUNT 11 #define USED_TIMERS ( TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(8) | TIM_N(12) ) -#elif defined(AIRBOTF4) || defined(AIRBOTF4SD) -#define USABLE_TIMER_CHANNEL_COUNT 13 +#elif defined(AIRBOTF4) +#define USABLE_TIMER_CHANNEL_COUNT 12 #define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(5) | TIM_N(8) | TIM_N(12) ) +#elif defined(AIRBOTF4SD) +#define USABLE_TIMER_CHANNEL_COUNT 13 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) | TIM_N(12) ) #else #define USABLE_TIMER_CHANNEL_COUNT 12 #define USED_TIMERS ( TIM_N(2) | TIM_N(3) | TIM_N(5) | TIM_N(8) | TIM_N(12) ) From 447e4ba9bfe341330180503148278c04e386feaa Mon Sep 17 00:00:00 2001 From: jflyper Date: Wed, 29 Mar 2017 12:48:34 +0900 Subject: [PATCH 2/2] AIRBOTF4 Add PB6 for LED --- src/main/target/REVO/target.c | 10 +++------- src/main/target/REVO/target.h | 7 ++----- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/src/main/target/REVO/target.c b/src/main/target/REVO/target.c index 92feda1bd..5aeb68bf6 100644 --- a/src/main/target/REVO/target.c +++ b/src/main/target/REVO/target.c @@ -37,16 +37,12 @@ const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { DEF_TIM(TIM2, CH3, PA2, TIM_USE_MOTOR, 1, 0), // S4_OUT D1_ST1 #ifdef REVOLT DEF_TIM(TIM4, CH1, PB6, TIM_USE_LED, 0, 0), // LED for REVOLT D1_ST0 -#elif defined(AIRBOTF4SD) +#elif defined(AIRBOTF4) || defined(AIRBOTF4SD) DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 1, 0), // S5_OUT DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 1, 0), // S6_OUT - DEF_TIM(TIM4, CH1, PB6, TIM_USE_LED, 0, 0), // LED D1_ST0 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_LED, 0, 0), // LED D1_ST0, n/a on older AIRBOTF4 #else DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR | TIM_USE_LED, 1, 0), // S5_OUT / LED -#ifdef AIRBOTF4 - DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 1, 0), // S6_OUT -#else DEF_TIM(TIM5, CH1, PA0, TIM_USE_MOTOR, 1, 0), // S6_OUT D1_ST2 -#endif /* AIRBOTF4 */ -#endif /* REVOLT */ +#endif }; diff --git a/src/main/target/REVO/target.h b/src/main/target/REVO/target.h index 4610ff1ff..665cc54ff 100644 --- a/src/main/target/REVO/target.h +++ b/src/main/target/REVO/target.h @@ -252,12 +252,9 @@ #ifdef REVOLT #define USABLE_TIMER_CHANNEL_COUNT 11 #define USED_TIMERS ( TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(8) | TIM_N(12) ) -#elif defined(AIRBOTF4) -#define USABLE_TIMER_CHANNEL_COUNT 12 -#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(5) | TIM_N(8) | TIM_N(12) ) -#elif defined(AIRBOTF4SD) +#elif defined(AIRBOTF4) || defined(AIRBOTF4SD) #define USABLE_TIMER_CHANNEL_COUNT 13 -#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) | TIM_N(12) ) +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(5) | TIM_N(8) | TIM_N(12) ) #else #define USABLE_TIMER_CHANNEL_COUNT 12 #define USED_TIMERS ( TIM_N(2) | TIM_N(3) | TIM_N(5) | TIM_N(8) | TIM_N(12) )