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
+2 -10
View File
@@ -23,7 +23,6 @@
#include "stm32_gpio.h"
#include "stm32_i2c_driver.h"
#include "stm32_hal.h"
#include "stm32_ws2812.h"
#include "stm32_spi.h"
#include "flash_driver.h"
@@ -59,17 +58,10 @@
// common ADC driver
extern const etx_hal_adc_driver_t _adc_driver;
// RGB LED timer
extern const stm32_pulse_timer_t _led_timer;
static void led_strip_off()
{
for (uint8_t i = 0; i < LED_STRIP_LENGTH; i++) {
ws2812_set_color(i, 0, 0, 0);
}
ws2812_update(&_led_timer);
}
rgbLedClearAll();
}
void INTERNAL_MODULE_ON()
{