aboutsummaryrefslogtreecommitdiff
path: root/quantum/light_ws2812.h
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/light_ws2812.h')
-rwxr-xr-xquantum/light_ws2812.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/quantum/light_ws2812.h b/quantum/light_ws2812.h
index 54eef22d9..9498e550e 100755
--- a/quantum/light_ws2812.h
+++ b/quantum/light_ws2812.h
@@ -16,6 +16,21 @@
16#include <avr/io.h> 16#include <avr/io.h>
17#include <avr/interrupt.h> 17#include <avr/interrupt.h>
18//#include "ws2812_config.h" 18//#include "ws2812_config.h"
19//#include "i2cmaster.h"
20
21#define LIGHT_I2C 1
22#define LIGHT_I2C_ADDR 0x84
23#define LIGHT_I2C_ADDR_WRITE ( (LIGHT_I2C_ADDR<<1) | I2C_WRITE )
24#define LIGHT_I2C_ADDR_READ ( (LIGHT_I2C_ADDR<<1) | I2C_READ )
25
26#define RGBW 1
27
28#ifdef RGBW
29 #define LED_TYPE struct cRGBW
30#else
31 #define LED_TYPE struct cRGB
32#endif
33
19 34
20/* 35/*
21 * Structure of the LED array 36 * Structure of the LED array
@@ -42,9 +57,9 @@ struct cRGBW { uint8_t g; uint8_t r; uint8_t b; uint8_t w;};
42 * - Wait 50�s to reset the LEDs 57 * - Wait 50�s to reset the LEDs
43 */ 58 */
44 59
45void ws2812_setleds (struct cRGB *ledarray, uint16_t number_of_leds); 60void ws2812_setleds (LED_TYPE *ledarray, uint16_t number_of_leds);
46void ws2812_setleds_pin (struct cRGB *ledarray, uint16_t number_of_leds,uint8_t pinmask); 61void ws2812_setleds_pin (LED_TYPE *ledarray, uint16_t number_of_leds,uint8_t pinmask);
47void ws2812_setleds_rgbw(struct cRGBW *ledarray, uint16_t number_of_leds); 62void ws2812_setleds_rgbw(LED_TYPE *ledarray, uint16_t number_of_leds);
48 63
49/* 64/*
50 * Old interface / Internal functions 65 * Old interface / Internal functions