diff options
author | Ryan <[email protected]> | 2023-09-04 10:19:59 +1000 |
---|---|---|
committer | GitHub <[email protected]> | 2023-09-04 01:19:59 +0100 |
commit | 41bd4e35a09cc50f45112074d2b776254a3a17f8 (patch) | |
tree | 9258c5ad40dda232e3b8271942b436bdafa6f115 /drivers/led | |
parent | 1e3095f9cce45fab0a566e692b1ff1c2047cfa08 (diff) | |
download | qmk_firmware-41bd4e35a09cc50f45112074d2b776254a3a17f8.tar.gz qmk_firmware-41bd4e35a09cc50f45112074d2b776254a3a17f8.zip |
Clean up RGB LED type (#21859)
Diffstat (limited to 'drivers/led')
-rw-r--r-- | drivers/led/apa102.c | 8 | ||||
-rw-r--r-- | drivers/led/apa102.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/led/apa102.c b/drivers/led/apa102.c index 766d8cd2eb..87db19523c 100644 --- a/drivers/led/apa102.c +++ b/drivers/led/apa102.c @@ -61,18 +61,18 @@ void static apa102_end_frame(uint16_t num_leds); void static apa102_send_frame(uint8_t red, uint8_t green, uint8_t blue, uint8_t brightness); void static apa102_send_byte(uint8_t byte); -void apa102_setleds(LED_TYPE *start_led, uint16_t num_leds) { - LED_TYPE *end = start_led + num_leds; +void apa102_setleds(rgb_led_t *start_led, uint16_t num_leds) { + rgb_led_t *end = start_led + num_leds; apa102_start_frame(); - for (LED_TYPE *led = start_led; led < end; led++) { + for (rgb_led_t *led = start_led; led < end; led++) { apa102_send_frame(led->r, led->g, led->b, apa102_led_brightness); } apa102_end_frame(num_leds); } // Overwrite the default rgblight_call_driver to use apa102 driver -void rgblight_call_driver(LED_TYPE *start_led, uint8_t num_leds) { +void rgblight_call_driver(rgb_led_t *start_led, uint8_t num_leds) { apa102_setleds(start_led, num_leds); } diff --git a/drivers/led/apa102.h b/drivers/led/apa102.h index 58cf020c1e..cd0a19d445 100644 --- a/drivers/led/apa102.h +++ b/drivers/led/apa102.h @@ -37,5 +37,5 @@ extern uint8_t apa102_led_brightness; * - Set the data-out pin as output * - Send out the LED data */ -void apa102_setleds(LED_TYPE *start_led, uint16_t num_leds); +void apa102_setleds(rgb_led_t *start_led, uint16_t num_leds); void apa102_set_brightness(uint8_t brightness); |