summaryrefslogtreecommitdiff
path: root/platforms
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2023-03-30 12:21:02 +1100
committerGitHub <noreply@github.com>2023-03-30 12:21:02 +1100
commit647c2835e65995339fb9380830c53725a62f6299 (patch)
tree8e5b96ea65f2a4c5e0990ac09dfc7f019ac1b90e /platforms
parent7e1e662dc704736b88cc4a7487457638b72f54e8 (diff)
WS2812 driver improvements (#20262)
Diffstat (limited to 'platforms')
-rw-r--r--platforms/avr/drivers/ws2812_bitbang.c (renamed from platforms/avr/drivers/ws2812.c)0
-rw-r--r--platforms/avr/drivers/ws2812_i2c.c10
-rw-r--r--platforms/chibios/drivers/ws2812_bitbang.c (renamed from platforms/chibios/drivers/ws2812.c)0
3 files changed, 5 insertions, 5 deletions
diff --git a/platforms/avr/drivers/ws2812.c b/platforms/avr/drivers/ws2812_bitbang.c
index 5c0cb3b718..5c0cb3b718 100644
--- a/platforms/avr/drivers/ws2812.c
+++ b/platforms/avr/drivers/ws2812_bitbang.c
diff --git a/platforms/avr/drivers/ws2812_i2c.c b/platforms/avr/drivers/ws2812_i2c.c
index 709f382254..f4a2fbe0b3 100644
--- a/platforms/avr/drivers/ws2812_i2c.c
+++ b/platforms/avr/drivers/ws2812_i2c.c
@@ -5,12 +5,12 @@
# error "RGBW not supported"
#endif
-#ifndef WS2812_ADDRESS
-# define WS2812_ADDRESS 0xb0
+#ifndef WS2812_I2C_ADDRESS
+# define WS2812_I2C_ADDRESS 0xB0
#endif
-#ifndef WS2812_TIMEOUT
-# define WS2812_TIMEOUT 100
+#ifndef WS2812_I2C_TIMEOUT
+# define WS2812_I2C_TIMEOUT 100
#endif
void ws2812_init(void) {
@@ -25,5 +25,5 @@ void ws2812_setleds(LED_TYPE *ledarray, uint16_t leds) {
s_init = true;
}
- i2c_transmit(WS2812_ADDRESS, (uint8_t *)ledarray, sizeof(LED_TYPE) * leds, WS2812_TIMEOUT);
+ i2c_transmit(WS2812_I2C_ADDRESS, (uint8_t *)ledarray, sizeof(LED_TYPE) * leds, WS2812_I2C_TIMEOUT);
}
diff --git a/platforms/chibios/drivers/ws2812.c b/platforms/chibios/drivers/ws2812_bitbang.c
index 55ac333b1e..55ac333b1e 100644
--- a/platforms/chibios/drivers/ws2812.c
+++ b/platforms/chibios/drivers/ws2812_bitbang.c