1
0
Fork 0

Add init function to RGBLight driver struct (#23076)

This commit is contained in:
Ryan 2024-03-18 22:03:27 +11:00 committed by GitHub
parent 23b7a02ebe
commit f7cf40fa77
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
42 changed files with 306 additions and 93 deletions

View file

@ -389,12 +389,6 @@ void ws2812_write_led_rgbw(uint16_t led_number, uint8_t r, uint8_t g, uint8_t b,
// Setleds for standard RGB
void ws2812_setleds(rgb_led_t* ledarray, uint16_t leds) {
static bool s_init = false;
if (!s_init) {
ws2812_init();
s_init = true;
}
for (uint16_t i = 0; i < leds; i++) {
#ifdef RGBW
ws2812_write_led_rgbw(i, ledarray[i].r, ledarray[i].g, ledarray[i].b, ledarray[i].w);