From 90fd7734bb430d735f785a1b71d20a235440207a Mon Sep 17 00:00:00 2001 From: David Sidrane Date: Tue, 27 Jun 2017 13:21:01 -1000 Subject: [PATCH] px4fmu-v5:Define UI LEDs per the FMUv5 Spec --- src/drivers/boards/px4fmu-v5/board_config.h | 13 +++++++------ src/drivers/boards/px4fmu-v5/px4fmu_timer_config.c | 6 +++--- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/drivers/boards/px4fmu-v5/board_config.h b/src/drivers/boards/px4fmu-v5/board_config.h index 10c24713e7..20d6a8e262 100644 --- a/src/drivers/boards/px4fmu-v5/board_config.h +++ b/src/drivers/boards/px4fmu-v5/board_config.h @@ -339,15 +339,16 @@ __BEGIN_DECLS #define BOARD_HAS_LED_PWM #define BOARD_LED_PWM_DRIVE_ACTIVE_LOW 1 -#define LED_TIM3_CH1OUT /* PC6 T3C1 GREEN */ GPIO_TIM3_CH1OUT_3 -#define LED_TIM3_CH2OUT /* PC7 T3C2 BLUE */ GPIO_TIM3_CH2OUT_3 -#define LED_TIM3_CH4OUT /* PB1 T3C4 RED */ GPIO_TIM3_CH4OUT_1 +#define LED_TIM3_CH1OUT /* PC6 T3C1 GREEN */ GPIO_TIM3_CH1OUT_3 +#define LED_TIM3_CH2OUT /* PC7 T3C2 BLUE */ GPIO_TIM3_CH2OUT_3 +#define LED_TIM3_CH4OUT /* PB1 T3C4 RED */ GPIO_TIM3_CH4OUT_1 #define BOARD_HAS_UILED_PWM #undef BOARD_UILED_PWM_DRIVE_ACTIVE_LOW -#define LED_TIM5_CH1OUT /* PH10 T5C1 RED */ GPIO_TIM5_CH1OUT_2 -#define LED_TIM5_CH2OUT /* PH11 T5C2 GREEN */ GPIO_TIM5_CH2OUT_2 -#define LED_TIM5_CH3OUT /* PH12 T5C3 BLUE */ GPIO_TIM5_CH3OUT_2 + +#define UILED_TIM5_CH1OUT /* PH10 T5C1 RED */ GPIO_TIM5_CH1OUT_2 +#define UILED_TIM5_CH2OUT /* PH11 T5C2 GREEN */ GPIO_TIM5_CH2OUT_2 +#define UILED_TIM5_CH3OUT /* PH12 T5C3 BLUE */ GPIO_TIM5_CH3OUT_2 /* User GPIOs diff --git a/src/drivers/boards/px4fmu-v5/px4fmu_timer_config.c b/src/drivers/boards/px4fmu-v5/px4fmu_timer_config.c index ef5eca0190..9e96896ed0 100644 --- a/src/drivers/boards/px4fmu-v5/px4fmu_timer_config.c +++ b/src/drivers/boards/px4fmu-v5/px4fmu_timer_config.c @@ -213,19 +213,19 @@ __EXPORT const struct timer_io_channels_t led_pwm_channels[MAX_TIMER_LED_CHANNEL .timer_channel = 2, }, { - .gpio_out = LED_TIM5_CH1OUT, + .gpio_out = UILED_TIM5_CH1OUT, .gpio_in = 0, .timer_index = 1, .timer_channel = 1, }, { - .gpio_out = LED_TIM5_CH2OUT, + .gpio_out = UILED_TIM5_CH2OUT, .gpio_in = 0, .timer_index = 1, .timer_channel = 2, }, { - .gpio_out = LED_TIM5_CH3OUT, + .gpio_out = UILED_TIM5_CH3OUT, .gpio_in = 0, .timer_index = 1, .timer_channel = 3,