APA102: API rework (#23355)
This commit is contained in:
parent
c4a74be7f0
commit
55538b2e1e
4 changed files with 70 additions and 29 deletions
|
@ -14,6 +14,14 @@ const rgblight_driver_t rgblight_driver = {
|
|||
#elif defined(RGBLIGHT_APA102)
|
||||
# include "apa102.h"
|
||||
|
||||
// Temporary shim
|
||||
static void apa102_setleds(rgb_led_t *ledarray, uint16_t number_of_leds) {
|
||||
for (uint16_t i = 0; i < number_of_leds; i++) {
|
||||
apa102_set_color(i, ledarray[i].r, ledarray[i].g, ledarray[i].b);
|
||||
}
|
||||
apa102_flush();
|
||||
}
|
||||
|
||||
const rgblight_driver_t rgblight_driver = {
|
||||
.init = apa102_init,
|
||||
.setleds = apa102_setleds,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue