Skip to content

Commit

Permalink
[fix] fix build with a proper config of WS2812 timer
Browse files Browse the repository at this point in the history
  • Loading branch information
gautierhattenberger committed May 15, 2020
1 parent 019beed commit 1d54969
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
3 changes: 3 additions & 0 deletions conf/modules/light_scheduler.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
This module is an example of controlling several leds with the color changing continuously.
Implementation for ChibiOS using DMA.
</description>
<configure name="WS2812_TIM" value="TIM1" description="Select the timer used to control the LEDs"/>
<define name="WS2812_NB_LEDS" value="8" description="Number of leds"/>
</doc>
<header>
Expand All @@ -17,6 +18,8 @@
<init fun="light_scheduler_init()"/>
<periodic fun="light_scheduler_periodic()" freq="8"/>
<makefile target="ap">
<configure name="WS2812_TIM" default="TIM1" case="upper"/>
<define name="STM32_PWM_USE_$(WS2812_TIM)" cond="ifeq ($(RTOS),chibios)"/>
<file name="light_scheduler.c"/>
<file_arch name="light_ws2812_arch.c"/>
<file_arch name="hal_stm32_dma.c" dir="mcu_periph" cond="ifeq ($(RTOS),chibios)"/>
Expand Down
1 change: 0 additions & 1 deletion sw/airborne/boards/apogee/chibios/v1.0/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,6 @@
/**
* For WS2812
*/
#define STM32_PWM_USE_TIM1 TRUE
#define WS2812D1_GPIO GPIOA
#define WS2812D1_PIN GPIO8
#define WS2812D1_AF 1
Expand Down
1 change: 0 additions & 1 deletion sw/airborne/boards/tawaki/chibios/v1.0/tawaki.h
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,6 @@
/**
* For WS2812
*/
#define STM32_PWM_USE_TIM5 TRUE
#define WS2812D1_GPIO GPIOA
#define WS2812D1_PIN GPIO0
#define WS2812D1_AF 2
Expand Down

0 comments on commit 1d54969

Please sign in to comment.