summaryrefslogtreecommitdiff
path: root/drivers/led/apa102.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/led/apa102.c')
-rw-r--r--drivers/led/apa102.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/led/apa102.c b/drivers/led/apa102.c
index 766d8cd2eb..527519eb8a 100644
--- a/drivers/led/apa102.c
+++ b/drivers/led/apa102.c
@@ -24,7 +24,7 @@
# elif defined(PROTOCOL_CHIBIOS)
# include "hal.h"
# include "chibios_config.h"
-# if defined(STM32F0XX) || defined(STM32F1XX) || defined(STM32F3XX) || defined(STM32F4XX) || defined(STM32L0XX) || defined(GD32VF103)
+# if defined(STM32F0XX) || defined(STM32F1XX) || defined(STM32F3XX) || defined(STM32F4XX) || defined(STM32L0XX) || defined(GD32VF103) || defined(MCU_RP)
# define APA102_NOPS (100 / (1000000000L / (CPU_CLOCK / 4))) // This calculates how many loops of 4 nops to run to delay 100 ns
# else
# error APA102_NOPS configuration required
@@ -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);
}