diff options
Diffstat (limited to 'platforms/chibios/drivers/ws2812_spi.c')
| -rw-r--r-- | platforms/chibios/drivers/ws2812_spi.c | 10 | 
1 files changed, 2 insertions, 8 deletions
| diff --git a/platforms/chibios/drivers/ws2812_spi.c b/platforms/chibios/drivers/ws2812_spi.c index 01162f07f4..ad2e87781c 100644 --- a/platforms/chibios/drivers/ws2812_spi.c +++ b/platforms/chibios/drivers/ws2812_spi.c @@ -76,7 +76,7 @@  #endif  #define BYTES_FOR_LED_BYTE 4 -#ifdef RGBW +#ifdef WS2812_RGBW  #    define WS2812_CHANNELS 4  #else  #    define WS2812_CHANNELS 3 @@ -131,7 +131,7 @@ static void set_led_color_rgb(rgb_led_t color, int pos) {      for (int j = 0; j < 4; j++)          tx_start[BYTES_FOR_LED * pos + BYTES_FOR_LED_BYTE * 2 + j] = get_protocol_eq(color.r, j);  #endif -#ifdef RGBW +#ifdef WS2812_RGBW      for (int j = 0; j < 4; j++)          tx_start[BYTES_FOR_LED * pos + BYTES_FOR_LED_BYTE * 4 + j] = get_protocol_eq(color.w, j);  #endif @@ -188,12 +188,6 @@ void ws2812_init(void) {  }  void ws2812_setleds(rgb_led_t* ledarray, uint16_t leds) { -    static bool s_init = false; -    if (!s_init) { -        ws2812_init(); -        s_init = true; -    } -      for (uint8_t i = 0; i < leds; i++) {          set_led_color_rgb(ledarray[i], i);      } | 
