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:
Raphael Coeffic
2026-04-29 20:09:07 +10:00
committed by GitHub
co-authored by Claude Opus 4.7
parent 462b0351ef
commit ac4c4d7b6b
16 changed files with 244 additions and 169 deletions
+1 -8
View File
@@ -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