From e7711b3b665c7df0a2a1d7272580cc01be28590d Mon Sep 17 00:00:00 2001 From: XScorpion2 Date: Tue, 4 Jun 2019 13:04:30 -0500 Subject: Moving rgb typedefs into a single location (#5978) Because someone named the define poorly Using full relative path as handwired/promethium has a color.h file --- quantum/color.h | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'quantum/color.h') diff --git a/quantum/color.h b/quantum/color.h index 9d51d45adb..22bb083519 100644 --- a/quantum/color.h +++ b/quantum/color.h @@ -32,12 +32,30 @@ #pragma pack( push, 1 ) #endif +#ifdef RGBW + #define LED_TYPE cRGBW +#else + #define LED_TYPE RGB +#endif + +// WS2812 specific layout 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; -} RGB; + uint8_t w; +} cRGBW; typedef struct PACKED { @@ -50,6 +68,6 @@ typedef struct PACKED #pragma pack( pop ) #endif -RGB hsv_to_rgb( HSV hsv ); +RGB hsv_to_rgb(HSV hsv); #endif // COLOR_H -- cgit v1.2.3