ws2811.h
Go to the documentation of this file.
1 /*
2  Copyright 2012-2014 Benjamin Vedder benjamin@vedder.se
3 
4  This program is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 /*
19  * ws2811.h
20  *
21  * Created on: 14 jul 2013
22  * Author: benjamin
23  */
24 
25 #ifndef WS2811_H_
26 #define WS2811_H_
27 
28 #include <stdint.h>
29 #include "conf_general.h"
30 
31 // Hex color definitions
32 #define COLOR_BLACK 0x000000
33 #define COLOR_WHITE 0xFFFFFF
34 
35 #define COLOR_BLUE 0x0000FF
36 #define COLOR_GREEN 0x00FF00
37 #define COLOR_RED 0xFF0000
38 
39 #define COLOR_NAVY 0x000080
40 #define COLOR_DARKBLUE 0x00008B
41 #define COLOR_DARKGREEN 0x006400
42 #define COLOR_DARKCYAN 0x008B8B
43 #define COLOR_CYAN 0x00FFFF
44 #define COLOR_TURQUOISE 0x40E0D0
45 #define COLOR_INDIGO 0x4B0082
46 #define COLOR_DARKRED 0x800000
47 #define COLOR_OLIVE 0x808000
48 #define COLOR_GRAY 0x808080
49 #define COLOR_SKYBLUE 0x87CEEB
50 #define COLOR_BLUEVIOLET 0x8A2BE2
51 #define COLOR_LIGHTGREEN 0x90EE90
52 #define COLOR_DARKVIOLET 0x9400D3
53 #define COLOR_YELLOWGREEN 0x9ACD32
54 #define COLOR_BROWN 0xA52A2A
55 #define COLOR_DARKGRAY 0xA9A9A9
56 #define COLOR_SIENNA 0xA0522D
57 #define COLOR_LIGHTBLUE 0xADD8E6
58 #define COLOR_GREENYELLOW 0xADFF2F
59 #define COLOR_SILVER 0xC0C0C0
60 #define COLOR_LIGHTGREY 0xD3D3D3
61 #define COLOR_LIGHTCYAN 0xE0FFFF
62 #define COLOR_VIOLET 0xEE82EE
63 #define COLOR_AZUR 0xF0FFFF
64 #define COLOR_BEIGE 0xF5F5DC
65 #define COLOR_MAGENTA 0xFF00FF
66 #define COLOR_TOMATO 0xFF6347
67 #define COLOR_GOLD 0xFFD700
68 #define COLOR_ORANGE 0xFFA500
69 #define COLOR_SNOW 0xFFFAFA
70 #define COLOR_YELLOW 0xFFFF00
71 
72 
73 // Functions
74 void ws2811_init(void);
75 void ws2811_set_led_color(int led, uint32_t color);
76 uint32_t ws2811_get_led_color(int led);
77 void ws2811_all_off(void);
78 void ws2811_set_all(uint32_t color);
79 
80 #endif /* WS2811_H_ */
void ws2811_set_all(uint32_t color)
Definition: ws2811.c:210
void ws2811_all_off(void)
Definition: ws2811.c:198
uint32_t ws2811_get_led_color(int led)
Definition: ws2811.c:190
void ws2811_init(void)
Definition: ws2811.c:47
void ws2811_set_led_color(int led, uint32_t color)
Definition: ws2811.c:172