summaryrefslogtreecommitdiff
path: root/quantum/color.h
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/color.h')
-rw-r--r--quantum/color.h45
1 files changed, 20 insertions, 25 deletions
diff --git a/quantum/color.h b/quantum/color.h
index 22bb083519..6781646628 100644
--- a/quantum/color.h
+++ b/quantum/color.h
@@ -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