summaryrefslogtreecommitdiffstats
path: root/platforms/avr/drivers
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2023-04-06 18:00:54 +1000
committerGitHub <noreply@github.com>2023-04-06 18:00:54 +1000
commit47966dc2a65c88ac90fcd64d12243d72f3f6753b (patch)
treed2f54974c74f66bf11565a64381ea8834f49d481 /platforms/avr/drivers
parent71c22a12db58c71952a12df6bbe445f6f9a4e858 (diff)
Migrate `rgblight.pin` and `RGB_DI_PIN` to `ws2812.pin` (#20303)
Diffstat (limited to 'platforms/avr/drivers')
-rw-r--r--platforms/avr/drivers/ws2812_bitbang.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/platforms/avr/drivers/ws2812_bitbang.c b/platforms/avr/drivers/ws2812_bitbang.c
index 5c0cb3b718..aad10d86b0 100644
--- a/platforms/avr/drivers/ws2812_bitbang.c
+++ b/platforms/avr/drivers/ws2812_bitbang.c
@@ -38,10 +38,10 @@
static inline void ws2812_sendarray_mask(uint8_t *data, uint16_t datlen, uint8_t masklo, uint8_t maskhi);
void ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds) {
- DDRx_ADDRESS(RGB_DI_PIN) |= pinmask(RGB_DI_PIN);
+ DDRx_ADDRESS(WS2812_DI_PIN) |= pinmask(WS2812_DI_PIN);
- uint8_t masklo = ~(pinmask(RGB_DI_PIN)) & PORTx_ADDRESS(RGB_DI_PIN);
- uint8_t maskhi = pinmask(RGB_DI_PIN) | PORTx_ADDRESS(RGB_DI_PIN);
+ uint8_t masklo = ~(pinmask(WS2812_DI_PIN)) & PORTx_ADDRESS(WS2812_DI_PIN);
+ uint8_t maskhi = pinmask(WS2812_DI_PIN) | PORTx_ADDRESS(WS2812_DI_PIN);
ws2812_sendarray_mask((uint8_t *)ledarray, number_of_leds * sizeof(LED_TYPE), masklo, maskhi);
@@ -165,7 +165,7 @@ static inline void ws2812_sendarray_mask(uint8_t *data, uint16_t datlen, uint8_t
" dec %0 \n\t" // '1' [+2] '0' [+2]
" brne loop%=\n\t" // '1' [+3] '0' [+4]
: "=&d"(ctr)
- : "r"(curbyte), "I"(_SFR_IO_ADDR(PORTx_ADDRESS(RGB_DI_PIN))), "r"(maskhi), "r"(masklo));
+ : "r"(curbyte), "I"(_SFR_IO_ADDR(PORTx_ADDRESS(WS2812_DI_PIN))), "r"(maskhi), "r"(masklo));
}
SREG = sreg_prev;