mirror of
https://github.com/Cian-H/qmk_firmware.git
synced 2025-12-22 22:21:58 +00:00
Add init function to RGBLight driver struct (#23076)
This commit is contained in:
@@ -21,5 +21,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
|
||||
void keyboard_post_init_user(void) {
|
||||
rgblite_init();
|
||||
rgblite_increase_hue();
|
||||
}
|
||||
|
||||
@@ -6,6 +6,10 @@
|
||||
#include "ws2812.h"
|
||||
#include "color.h"
|
||||
|
||||
static inline void rgblite_init(void) {
|
||||
ws2812_init();
|
||||
}
|
||||
|
||||
static inline void rgblite_setrgb(RGB rgb) {
|
||||
rgb_led_t leds[RGBLIGHT_LED_COUNT] = {{.r = rgb.r, .g = rgb.g, .b = rgb.b}};
|
||||
ws2812_setleds(leds, RGBLIGHT_LED_COUNT);
|
||||
|
||||
Reference in New Issue
Block a user