Add init function to RGBLight driver struct (#23076)
This commit is contained in:
@ -19,11 +19,5 @@ void ws2812_init(void) {
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
i2c_transmit(WS2812_I2C_ADDRESS, (uint8_t *)ledarray, sizeof(rgb_led_t) * leds, WS2812_I2C_TIMEOUT);
|
||||
}
|
||||
|
Reference in New Issue
Block a user