clang-format changes
This commit is contained in:
parent
61af76a10d
commit
b624f32f94
502 changed files with 32259 additions and 39062 deletions
|
@ -14,60 +14,55 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef COLOR_H
|
||||
#define COLOR_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#define PACKED __attribute__ ((__packed__))
|
||||
# define PACKED __attribute__((__packed__))
|
||||
#else
|
||||
#define PACKED
|
||||
# define PACKED
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma pack( push, 1 )
|
||||
# pragma pack(push, 1)
|
||||
#endif
|
||||
|
||||
#ifdef RGBW
|
||||
#define LED_TYPE cRGBW
|
||||
# define LED_TYPE cRGBW
|
||||
#else
|
||||
#define LED_TYPE RGB
|
||||
# define LED_TYPE RGB
|
||||
#endif
|
||||
|
||||
// WS2812 specific layout
|
||||
typedef struct PACKED
|
||||
{
|
||||
uint8_t g;
|
||||
uint8_t r;
|
||||
uint8_t b;
|
||||
typedef struct PACKED {
|
||||
uint8_t g;
|
||||
uint8_t r;
|
||||
uint8_t b;
|
||||
} cRGB;
|
||||
|
||||
typedef cRGB RGB;
|
||||
|
||||
// WS2812 specific layout
|
||||
typedef struct PACKED
|
||||
{
|
||||
uint8_t g;
|
||||
uint8_t r;
|
||||
uint8_t b;
|
||||
uint8_t w;
|
||||
typedef struct PACKED {
|
||||
uint8_t g;
|
||||
uint8_t r;
|
||||
uint8_t b;
|
||||
uint8_t w;
|
||||
} cRGBW;
|
||||
|
||||
typedef struct PACKED
|
||||
{
|
||||
uint8_t h;
|
||||
uint8_t s;
|
||||
uint8_t v;
|
||||
typedef struct PACKED {
|
||||
uint8_t h;
|
||||
uint8_t s;
|
||||
uint8_t v;
|
||||
} HSV;
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma pack( pop )
|
||||
# pragma pack(pop)
|
||||
#endif
|
||||
|
||||
RGB hsv_to_rgb(HSV hsv);
|
||||
|
||||
#endif // COLOR_H
|
||||
#endif // COLOR_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue