fix(rgbled): double-buffer WS2812 strip to eliminate races (#7304)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
462b0351ef
commit
ac4c4d7b6b
@@ -21,7 +21,6 @@
|
||||
|
||||
#include "stm32_adc.h"
|
||||
#include "stm32_gpio.h"
|
||||
#include "stm32_ws2812.h"
|
||||
#include "stm32_spi.h"
|
||||
|
||||
#include "hal/adc_driver.h"
|
||||
@@ -139,15 +138,9 @@ void delay_self(int count)
|
||||
}
|
||||
|
||||
#if defined(LED_STRIP_GPIO)
|
||||
// Common LED driver
|
||||
extern const stm32_pulse_timer_t _led_timer;
|
||||
|
||||
void ledStripOff()
|
||||
{
|
||||
for (uint8_t i = 0; i < LED_STRIP_LENGTH; i++) {
|
||||
ws2812_set_color(i, 0, 0, 0);
|
||||
}
|
||||
ws2812_update(&_led_timer);
|
||||
rgbLedClearAll();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user