summaryrefslogtreecommitdiffstats
path: root/quantum/light_ws2812.h
diff options
context:
space:
mode:
authorJoshua T <joshua@sonofone.net>2017-01-07 21:01:21 +0100
committerJoshua T <joshua@sonofone.net>2017-01-07 21:01:21 +0100
commit8f8d10475956a17953f6db4db3f3b50bd795c0d8 (patch)
tree90c80474baa080e5743ee745ec98254e1a2faadd /quantum/light_ws2812.h
parentb7b44dc481430438552d91b7069d5e37a5e3a649 (diff)
parente7df488a92da56cf160ac64c8cc7302ab717e145 (diff)
downloadqmk_firmware-8f8d10475956a17953f6db4db3f3b50bd795c0d8.tar.gz
qmk_firmware-8f8d10475956a17953f6db4db3f3b50bd795c0d8.tar.xz
Merged from upstream
Diffstat (limited to 'quantum/light_ws2812.h')
-rwxr-xr-xquantum/light_ws2812.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/quantum/light_ws2812.h b/quantum/light_ws2812.h
index 54eef22d9..2f78c20fc 100755
--- a/quantum/light_ws2812.h
+++ b/quantum/light_ws2812.h
@@ -16,6 +16,14 @@
#include <avr/io.h>
#include <avr/interrupt.h>
//#include "ws2812_config.h"
+//#include "i2cmaster.h"
+
+#ifdef RGBW
+ #define LED_TYPE struct cRGBW
+#else
+ #define LED_TYPE struct cRGB
+#endif
+
/*
* Structure of the LED array
@@ -42,9 +50,9 @@ struct cRGBW { uint8_t g; uint8_t r; uint8_t b; uint8_t w;};
* - Wait 50�s to reset the LEDs
*/
-void ws2812_setleds (struct cRGB *ledarray, uint16_t number_of_leds);
-void ws2812_setleds_pin (struct cRGB *ledarray, uint16_t number_of_leds,uint8_t pinmask);
-void ws2812_setleds_rgbw(struct cRGBW *ledarray, uint16_t number_of_leds);
+void ws2812_setleds (LED_TYPE *ledarray, uint16_t number_of_leds);
+void ws2812_setleds_pin (LED_TYPE *ledarray, uint16_t number_of_leds,uint8_t pinmask);
+void ws2812_setleds_rgbw(LED_TYPE *ledarray, uint16_t number_of_leds);
/*
* Old interface / Internal functions