diff options
author | dbroqua <dbroqua@mousur.org> | 2016-12-17 22:25:21 +0100 |
---|---|---|
committer | dbroqua <dbroqua@mousur.org> | 2016-12-17 22:25:21 +0100 |
commit | df50bee5a88cacbd1f5fab98b26c2068646b61c0 (patch) | |
tree | 60a59d80c173055788e66b7e9dd79aaad7b27df6 /quantum/light_ws2812.h | |
parent | 46b93f02d570c0bb66410cb8d9af2451d5453635 (diff) | |
parent | 13c4080a1d77cb1dfdf48df8a42e78b9dc483912 (diff) | |
download | qmk_firmware-df50bee5a88cacbd1f5fab98b26c2068646b61c0.tar.gz qmk_firmware-df50bee5a88cacbd1f5fab98b26c2068646b61c0.tar.xz |
Merge branch 'master' of https://github.com/Dbroqua/qmk_firmware
Diffstat (limited to 'quantum/light_ws2812.h')
-rwxr-xr-x | quantum/light_ws2812.h | 21 |
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 @@ #include <avr/io.h> #include <avr/interrupt.h> //#include "ws2812_config.h" +//#include "i2cmaster.h" + +#define LIGHT_I2C 1 +#define LIGHT_I2C_ADDR 0x84 +#define LIGHT_I2C_ADDR_WRITE ( (LIGHT_I2C_ADDR<<1) | I2C_WRITE ) +#define LIGHT_I2C_ADDR_READ ( (LIGHT_I2C_ADDR<<1) | I2C_READ ) + +#define RGBW 1 + +#ifdef RGBW + #define LED_TYPE struct cRGBW +#else + #define LED_TYPE struct cRGB +#endif + /* * Structure of the LED array @@ -42,9 +57,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 |