rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
hw_layer
drivers
led
ws2812_conf.h
Go to the documentation of this file.
1
#define WS2812_LED_N 22
// Number of LEDs
2
#define WS2812_PORT GPIOE
3
#define WS2812_PIN 9
4
#define WS2812_TIM_N 1
// timer, 1-11
5
#define WS2812_TIM_CH 0
// timer channel, 0-3
6
#define WS2812_DMA_STREAM STM32_DMA_STREAM_ID(2, 5)
//DMA2 Stream 5 // DMA stream for TIMx_UP (look up in reference manual under DMA Channel selection)
7
#define WS2812_DMA_CHANNEL 6
// DMA channel for TIMx_UP
8
9
#define WS2812_PWM_FREQUENCY (STM32_SYSCLK / 2)
/**< Clock frequency of PWM, must be valid with respect to system clock! */
10
#define WS2812_PWM_PERIOD (WS2812_PWM_FREQUENCY / 800000)
11
12
#define WS2812_DUTYCYCLE_0 (WS2812_PWM_FREQUENCY / (1000000000 / 220))
13
#define WS2812_DUTYCYCLE_1 (WS2812_PWM_FREQUENCY / (1000000000 / 580))
14
15
#define CONCAT_SYMBOLS(s1, s2) s1##s2
16
#define CONCAT_EXPANDED_SYMBOLS(s1, s2) CONCAT_SYMBOLS(s1, s2)
17
18
#define WS2812_PWM_DRIVER CONCAT_EXPANDED_SYMBOLS(PWMD, WS2812_TIM_N)
19
20
#define WS2812_BUFLEN ((WS2812_LED_N + 4) * 24)
Generated on Sat Sep 27 2025 00:10:06 for rusEFI by
1.9.8