summaryrefslogtreecommitdiff
path: root/quantum/color.h
diff options
context:
space:
mode:
authorskullY <skullydazed@gmail.com>2019-08-30 11:19:03 -0700
committerskullydazed <skullydazed@users.noreply.github.com>2019-08-30 15:01:52 -0700
commitb624f32f944acdc59dcb130674c09090c5c404cb (patch)
treebc13adbba137d122d9a2c2fb2fafcbb08ac10e25 /quantum/color.h
parent61af76a10d00aba185b8338604171de490a13e3b (diff)
clang-format changes
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