aboutsummaryrefslogtreecommitdiff
path: root/drivers/avr/ws2812_i2c.c
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2019-11-09 07:51:39 -0800
committerJoel Challis <git@zvecr.com>2019-11-09 15:51:39 +0000
commit60e4921378d879eed110f801328e9642f35fa1e9 (patch)
tree9bb36017ba58e7aedbcfee9db0bba1a3bc466359 /drivers/avr/ws2812_i2c.c
parent78205e64a7053746b1491c0d39dbb300a55f3248 (diff)
downloadqmk_firmware-60e4921378d879eed110f801328e9642f35fa1e9.tar.gz
qmk_firmware-60e4921378d879eed110f801328e9642f35fa1e9.zip
Unify RGB and RGBW commands (#7297)
* Fix unicode in comments Co-Authored-By: fauxpark <fauxpark@gmail.com> * 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
Diffstat (limited to 'drivers/avr/ws2812_i2c.c')
-rw-r--r--drivers/avr/ws2812_i2c.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/avr/ws2812_i2c.c b/drivers/avr/ws2812_i2c.c
index 8525a026c..1c332e24b 100644
--- a/drivers/avr/ws2812_i2c.c
+++ b/drivers/avr/ws2812_i2c.c
@@ -1,6 +1,10 @@
1#include "ws2812.h" 1#include "ws2812.h"
2#include "i2c_master.h" 2#include "i2c_master.h"
3 3
4#ifdef RGBW
5# error "RGBW not supported"
6#endif
7
4#ifndef WS2812_ADDRESS 8#ifndef WS2812_ADDRESS
5# define WS2812_ADDRESS 0xb0 9# define WS2812_ADDRESS 0xb0
6#endif 10#endif
@@ -21,11 +25,3 @@ void ws2812_setleds(LED_TYPE *ledarray, uint16_t leds) {
21 25
22 i2c_transmit(WS2812_ADDRESS, (uint8_t *)ledarray, sizeof(LED_TYPE) * leds, WS2812_TIMEOUT); 26 i2c_transmit(WS2812_ADDRESS, (uint8_t *)ledarray, sizeof(LED_TYPE) * leds, WS2812_TIMEOUT);
23} 27}
24
25// Setleds for SK6812RGBW
26void ws2812_setleds_rgbw(LED_TYPE *ledarray, uint16_t leds) {
27// not supported - for now error out if its enabled
28#ifdef RGBW
29# error "RGBW not supported"
30#endif
31}