mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-27 08:55:51 +08:00
[fix] fix build with a proper config of WS2812 timer
This commit is contained in:
@@ -9,6 +9,7 @@
|
|||||||
This module is an example of controlling several leds with the color changing continuously.
|
This module is an example of controlling several leds with the color changing continuously.
|
||||||
Implementation for ChibiOS using DMA.
|
Implementation for ChibiOS using DMA.
|
||||||
</description>
|
</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"/>
|
<define name="WS2812_NB_LEDS" value="8" description="Number of leds"/>
|
||||||
</doc>
|
</doc>
|
||||||
<header>
|
<header>
|
||||||
@@ -17,6 +18,8 @@
|
|||||||
<init fun="light_scheduler_init()"/>
|
<init fun="light_scheduler_init()"/>
|
||||||
<periodic fun="light_scheduler_periodic()" freq="8"/>
|
<periodic fun="light_scheduler_periodic()" freq="8"/>
|
||||||
<makefile target="ap">
|
<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 name="light_scheduler.c"/>
|
||||||
<file_arch name="light_ws2812_arch.c"/>
|
<file_arch name="light_ws2812_arch.c"/>
|
||||||
<file_arch name="hal_stm32_dma.c" dir="mcu_periph" cond="ifeq ($(RTOS),chibios)"/>
|
<file_arch name="hal_stm32_dma.c" dir="mcu_periph" cond="ifeq ($(RTOS),chibios)"/>
|
||||||
|
|||||||
@@ -582,7 +582,6 @@
|
|||||||
/**
|
/**
|
||||||
* For WS2812
|
* For WS2812
|
||||||
*/
|
*/
|
||||||
#define STM32_PWM_USE_TIM1 TRUE
|
|
||||||
#define WS2812D1_GPIO GPIOA
|
#define WS2812D1_GPIO GPIOA
|
||||||
#define WS2812D1_PIN GPIO8
|
#define WS2812D1_PIN GPIO8
|
||||||
#define WS2812D1_AF 1
|
#define WS2812D1_AF 1
|
||||||
|
|||||||
@@ -819,7 +819,6 @@
|
|||||||
/**
|
/**
|
||||||
* For WS2812
|
* For WS2812
|
||||||
*/
|
*/
|
||||||
#define STM32_PWM_USE_TIM5 TRUE
|
|
||||||
#define WS2812D1_GPIO GPIOA
|
#define WS2812D1_GPIO GPIOA
|
||||||
#define WS2812D1_PIN GPIO0
|
#define WS2812D1_PIN GPIO0
|
||||||
#define WS2812D1_AF 2
|
#define WS2812D1_AF 2
|
||||||
|
|||||||
Reference in New Issue
Block a user