LP-89 - Port OP_15.05.01 fixes. Release notes:
[librepilot.git] / flight / libraries / inc / optypes.h
blob6b9080db76343b0357186abee062d40b542c4923
1 /**
2 ******************************************************************************
4 * @file optypes.h
5 * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2014.
6 * @brief OP Generic data type library
7 * --
8 * @see The GNU Public License (GPL) Version 3
10 *****************************************************************************/
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 3 of the License, or
15 * (at your option) any later version.
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
19 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20 * for more details.
22 * You should have received a copy of the GNU General Public License along
23 * with this program; if not, write to the Free Software Foundation, Inc.,
24 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 #ifndef UTIL_H
27 #define UTIL_H
28 #include <stdint.h>
29 typedef struct {
30 uint8_t R;
31 uint8_t G;
32 uint8_t B;
33 } Color_t;
35 extern const Color_t Color_Off;
36 extern const Color_t Color_Black;
37 extern const Color_t Color_Red;
38 extern const Color_t Color_Lime;
39 extern const Color_t Color_Blue;
40 extern const Color_t Color_Yellow;
41 extern const Color_t Color_Cian;
42 extern const Color_t Color_Magenta;
43 extern const Color_t Color_Navy;
44 extern const Color_t Color_Green;
45 extern const Color_t Color_Purple;
46 extern const Color_t Color_Teal;
47 extern const Color_t Color_Orange;
48 extern const Color_t Color_White;
50 #define COLOR_BLACK { .R = 0x00, .G = 0x00, .B = 0x00 }
51 #define COLOR_OFF COLOR_BLACK
52 #define COLOR_RED { .R = 0xFF, .G = 0x00, .B = 0x00 }
53 #define COLOR_LIME { .R = 0x00, .G = 0xFF, .B = 0x00 }
54 #define COLOR_BLUE { .R = 0x00, .G = 0x00, .B = 0xFF }
55 #define COLOR_YELLOW { .R = 0xFF, .G = 0xFF, .B = 0x00 }
56 #define COLOR_CIAN { .R = 0x00, .G = 0xFF, .B = 0xFF }
57 #define COLOR_MAGENTA { .R = 0xFF, .G = 0x00, .B = 0xFF }
58 #define COLOR_NAVY { .R = 0x00, .G = 0x00, .B = 0x80 }
59 #define COLOR_GREEN { .R = 0x00, .G = 0x80, .B = 0x00 }
60 #define COLOR_PURPLE { .R = 0x80, .G = 0x00, .B = 0x80 }
61 #define COLOR_TEAL { .R = 0x00, .G = 0x80, .B = 0x80 }
62 #define COLOR_ORANGE { .R = 0xFF, .G = 0xA5, .B = 0x00 }
63 #define COLOR_WHITE { .R = 0xAA, .G = 0xAA, .B = 0xAA }
64 #endif /* UTIL_H */