From 60e4921378d879eed110f801328e9642f35fa1e9 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sat, 9 Nov 2019 07:51:39 -0800 Subject: Unify RGB and RGBW commands (#7297) * Fix unicode in comments Co-Authored-By: fauxpark * Remove separate RGBW implementation for a unified function * Set White to 0 in RGBW LEDs This is just to get this working, later, proper brightness can be handled elsewhere. * Use us instead of nanoseconds(?) since it renders correctly on web * Remove RGBW function from arm/ws2812.h * Remove RGBW function from arm/ws2812.c * Formatting changes * Add doc info --- drivers/avr/ws2812_i2c.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'drivers/avr/ws2812_i2c.c') diff --git a/drivers/avr/ws2812_i2c.c b/drivers/avr/ws2812_i2c.c index 8525a026c7..1c332e24b6 100644 --- a/drivers/avr/ws2812_i2c.c +++ b/drivers/avr/ws2812_i2c.c @@ -1,6 +1,10 @@ #include "ws2812.h" #include "i2c_master.h" +#ifdef RGBW +# error "RGBW not supported" +#endif + #ifndef WS2812_ADDRESS # define WS2812_ADDRESS 0xb0 #endif @@ -21,11 +25,3 @@ void ws2812_setleds(LED_TYPE *ledarray, uint16_t leds) { i2c_transmit(WS2812_ADDRESS, (uint8_t *)ledarray, sizeof(LED_TYPE) * leds, WS2812_TIMEOUT); } - -// Setleds for SK6812RGBW -void ws2812_setleds_rgbw(LED_TYPE *ledarray, uint16_t leds) { -// not supported - for now error out if its enabled -#ifdef RGBW -# error "RGBW not supported" -#endif -} -- cgit v1.2.3