feat(gx12): add safety timer for port expander (#6325)

This commit is contained in:
Raphael Coeffic
2025-05-30 20:22:55 +10:00
committed by GitHub
parent 11a3dd7d7a
commit 55e8a50b71
8 changed files with 43 additions and 23 deletions
+2 -1
View File
@@ -78,7 +78,7 @@ static void _refresh_cb(timer_handle_t* timer)
ws2812_update(&_led_timer);
}
void rgbLedStart()
static void rgbLedStart()
{
if (!timer_is_created(&_refresh_timer)) {
timer_create(&_refresh_timer, _refresh_cb, "rgbled",
@@ -111,6 +111,7 @@ void rgbLedInit()
{
ws2812_init(&_led_timer, _led_colors, LED_STRIP_LENGTH, WS2812_GRB);
rgbLedClearAll();
rgbLedStart();
}
// Make sure the timer channel is supported
@@ -24,7 +24,6 @@
#include <stdint.h>
void rgbLedInit();
void rgbLedStart();
void rgbLedStop();
void rgbSetLedColor(uint8_t led, uint8_t r, uint8_t g, uint8_t b);