aboutsummaryrefslogtreecommitdiff
path: root/quantum/light_ws2812.h
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/light_ws2812.h')
-rwxr-xr-xquantum/light_ws2812.h28
1 files changed, 23 insertions, 5 deletions
diff --git a/quantum/light_ws2812.h b/quantum/light_ws2812.h
index 54eef22d9..60924a0fb 100755
--- a/quantum/light_ws2812.h
+++ b/quantum/light_ws2812.h
@@ -6,8 +6,18 @@
6 * 6 *
7 * Please do not change this file! All configuration is handled in "ws2812_config.h" 7 * Please do not change this file! All configuration is handled in "ws2812_config.h"
8 * 8 *
9 * License: GNU GPL v2 (see License.txt) 9 * This program is free software: you can redistribute it and/or modify
10 + 10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation, either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program. If not, see <http://www.gnu.org/licenses/>.
11 */ 21 */
12 22
13#ifndef LIGHT_WS2812_H_ 23#ifndef LIGHT_WS2812_H_
@@ -16,6 +26,14 @@
16#include <avr/io.h> 26#include <avr/io.h>
17#include <avr/interrupt.h> 27#include <avr/interrupt.h>
18//#include "ws2812_config.h" 28//#include "ws2812_config.h"
29//#include "i2cmaster.h"
30
31#ifdef RGBW
32 #define LED_TYPE struct cRGBW
33#else
34 #define LED_TYPE struct cRGB
35#endif
36
19 37
20/* 38/*
21 * Structure of the LED array 39 * Structure of the LED array
@@ -42,9 +60,9 @@ struct cRGBW { uint8_t g; uint8_t r; uint8_t b; uint8_t w;};
42 * - Wait 50�s to reset the LEDs 60 * - Wait 50�s to reset the LEDs
43 */ 61 */
44 62
45void ws2812_setleds (struct cRGB *ledarray, uint16_t number_of_leds); 63void 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); 64void 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); 65void ws2812_setleds_rgbw(LED_TYPE *ledarray, uint16_t number_of_leds);
48 66
49/* 67/*
50 * Old interface / Internal functions 68 * Old interface / Internal functions