2020-06-10 23:33:26 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "ws2812.h"
|
2021-07-24 16:50:32 +02:00
|
|
|
#include "color.h"
|
2020-06-10 23:33:26 +02:00
|
|
|
|
2024-03-18 12:03:27 +01:00
|
|
|
static inline void rgblite_init(void) {
|
|
|
|
ws2812_init();
|
|
|
|
}
|
|
|
|
|
2021-07-24 16:50:32 +02:00
|
|
|
static inline void rgblite_setrgb(uint8_t _r, uint8_t _g, uint8_t _b) {
|
2024-03-18 12:03:27 +01:00
|
|
|
rgb_led_t leds[RGBLIGHT_LED_COUNT] = {{.r = _r, .g = _g, .b = _b}, {.r = _r, .g = _g, .b = _b}};
|
|
|
|
ws2812_setleds(leds, RGBLIGHT_LED_COUNT);
|
2020-06-10 23:33:26 +02:00
|
|
|
}
|