mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 09:16:07 +03:00
Improve speed of LED STRIP code.
Shaved about 150us each strip update. This commit leaves in some timing trace code for the CC3D target, the results of which can be seen in the debug variables for the sections being timed. A later commit will remove/disable the timing code.
This commit is contained in:
parent
36dac872b8
commit
e847a6347d
9 changed files with 189 additions and 15 deletions
|
@ -21,7 +21,12 @@
|
|||
#define WS2811_BITS_PER_LED 24
|
||||
#define WS2811_DELAY_BUFFER_LENGTH 42 // for 50us delay
|
||||
|
||||
#define WS2811_DMA_BUFFER_SIZE (WS2811_BITS_PER_LED * WS2811_LED_STRIP_LENGTH + WS2811_DELAY_BUFFER_LENGTH) // number of bytes needed is #LEDs * 24 bytes + 42 trailing bytes)
|
||||
#define WS2811_DATA_BUFFER_SIZE (WS2811_BITS_PER_LED * WS2811_LED_STRIP_LENGTH)
|
||||
|
||||
#define WS2811_DMA_BUFFER_SIZE (WS2811_DATA_BUFFER_SIZE + WS2811_DELAY_BUFFER_LENGTH) // number of bytes needed is #LEDs * 24 bytes + 42 trailing bytes)
|
||||
|
||||
#define BIT_COMPARE_1 17 // timer compare value for logical 1
|
||||
#define BIT_COMPARE_0 9 // timer compare value for logical 0
|
||||
|
||||
void ws2811LedStripInit(void);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue