diff options
Diffstat (limited to 'drivers/avr/ws2812_i2c.c')
| -rw-r--r-- | drivers/avr/ws2812_i2c.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/drivers/avr/ws2812_i2c.c b/drivers/avr/ws2812_i2c.c deleted file mode 100644 index 1c332e24b..000000000 --- a/drivers/avr/ws2812_i2c.c +++ /dev/null | |||
| @@ -1,27 +0,0 @@ | |||
| 1 | #include "ws2812.h" | ||
| 2 | #include "i2c_master.h" | ||
| 3 | |||
| 4 | #ifdef RGBW | ||
| 5 | # error "RGBW not supported" | ||
| 6 | #endif | ||
| 7 | |||
| 8 | #ifndef WS2812_ADDRESS | ||
| 9 | # define WS2812_ADDRESS 0xb0 | ||
| 10 | #endif | ||
| 11 | |||
| 12 | #ifndef WS2812_TIMEOUT | ||
| 13 | # define WS2812_TIMEOUT 100 | ||
| 14 | #endif | ||
| 15 | |||
| 16 | void ws2812_init(void) { i2c_init(); } | ||
| 17 | |||
| 18 | // Setleds for standard RGB | ||
| 19 | void ws2812_setleds(LED_TYPE *ledarray, uint16_t leds) { | ||
| 20 | static bool s_init = false; | ||
| 21 | if (!s_init) { | ||
| 22 | ws2812_init(); | ||
| 23 | s_init = true; | ||
| 24 | } | ||
| 25 | |||
| 26 | i2c_transmit(WS2812_ADDRESS, (uint8_t *)ledarray, sizeof(LED_TYPE) * leds, WS2812_TIMEOUT); | ||
| 27 | } | ||
