From 5f91fb413624781ac79db641549b9e08753c04b5 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Sun, 16 Oct 2016 16:03:33 -0400 Subject: working with power limit --- quantum/light_ws2812.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'quantum/light_ws2812.h') diff --git a/quantum/light_ws2812.h b/quantum/light_ws2812.h index 54eef22d9e..576c3bc483 100755 --- a/quantum/light_ws2812.h +++ b/quantum/light_ws2812.h @@ -16,6 +16,13 @@ #include #include //#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 ) + /* * Structure of the LED array -- cgit v1.2.3 From e9f748751808de2f1e85cf7fb670d78773bd5e76 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Sun, 13 Nov 2016 23:02:38 -0500 Subject: mostly working --- quantum/light_ws2812.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'quantum/light_ws2812.h') diff --git a/quantum/light_ws2812.h b/quantum/light_ws2812.h index 576c3bc483..0bef93d5ec 100755 --- a/quantum/light_ws2812.h +++ b/quantum/light_ws2812.h @@ -23,6 +23,14 @@ #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 @@ -49,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 -- cgit v1.2.3 From 664c0a036b3d7c3ed39f4a7a78d97f4a9cc7d20c Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 21 Nov 2016 19:50:55 -0500 Subject: cleaning up new code --- quantum/light_ws2812.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'quantum/light_ws2812.h') diff --git a/quantum/light_ws2812.h b/quantum/light_ws2812.h index 0bef93d5ec..9498e550e9 100755 --- a/quantum/light_ws2812.h +++ b/quantum/light_ws2812.h @@ -16,7 +16,7 @@ #include #include //#include "ws2812_config.h" -#include "i2cmaster.h" +//#include "i2cmaster.h" #define LIGHT_I2C 1 #define LIGHT_I2C_ADDR 0x84 -- cgit v1.2.3