Add init function to RGBLight driver struct (#23076)
This commit is contained in:
parent
23b7a02ebe
commit
f7cf40fa77
42 changed files with 306 additions and 93 deletions
|
@ -247,6 +247,8 @@ void rgblight_init(void) {
|
|||
rgblight_mode_noeeprom(rgblight_config.mode);
|
||||
}
|
||||
|
||||
rgblight_driver.init();
|
||||
|
||||
is_rgblight_initialized = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
# include "ws2812.h"
|
||||
|
||||
const rgblight_driver_t rgblight_driver = {
|
||||
.init = ws2812_init,
|
||||
.setleds = ws2812_setleds,
|
||||
};
|
||||
|
||||
|
@ -14,6 +15,7 @@ const rgblight_driver_t rgblight_driver = {
|
|||
# include "apa102.h"
|
||||
|
||||
const rgblight_driver_t rgblight_driver = {
|
||||
.init = apa102_init,
|
||||
.setleds = apa102_setleds,
|
||||
};
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "color.h"
|
||||
|
||||
typedef struct {
|
||||
void (*init)(void);
|
||||
void (*setleds)(rgb_led_t *ledarray, uint16_t number_of_leds);
|
||||
} rgblight_driver_t;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue