summaryrefslogtreecommitdiffstats
path: root/keyboards/zeal60/rgb_backlight.h
diff options
context:
space:
mode:
authorWilba <Jason.S.Williams@gmail.com>2018-11-30 17:43:34 +0100
committerDrashna Jaelre <drashna@live.com>2018-11-30 17:43:34 +0100
commitd7f1e072a859d7fcbaccd675b4bad7d02d214e52 (patch)
treefb24714b6f37ef58f265802897a5225abf171753 /keyboards/zeal60/rgb_backlight.h
parentb10aad45b60326c7e9f2d1fc67e45bd201341552 (diff)
downloadqmk_firmware-d7f1e072a859d7fcbaccd675b4bad7d02d214e52.tar.gz
qmk_firmware-d7f1e072a859d7fcbaccd675b4bad7d02d214e52.tar.xz
Added macros to Dynamic Keymaps, Zeal60 RGB backlight improvements (#4520)
* Refactored M6-B to use Zeal60 RGB backlight code * Fixed M6-B LED co-ordinates * Minor changes to RGB config for Zeal65 * Added dynamic keymaps to WT80-A, WT60-A, WT-80A, U80-A * Macro implementation * Implemented macros, API protocol version 8, RGB backlight fixes * Improved radial effects for M6-B * Fixed undefined references when building an RGB keyboard after M6-A
Diffstat (limited to 'keyboards/zeal60/rgb_backlight.h')
-rw-r--r--keyboards/zeal60/rgb_backlight.h25
1 files changed, 17 insertions, 8 deletions
diff --git a/keyboards/zeal60/rgb_backlight.h b/keyboards/zeal60/rgb_backlight.h
index 60f2ace51..aa24e3491 100644
--- a/keyboards/zeal60/rgb_backlight.h
+++ b/keyboards/zeal60/rgb_backlight.h
@@ -25,9 +25,15 @@
#include "quantum/color.h"
+typedef struct PACKED
+{
+ uint8_t h;
+ uint8_t s;
+} HS;
+
typedef struct
{
- HSV color;
+ HS color;
uint8_t index;
} backlight_config_indicator;
@@ -45,14 +51,17 @@ typedef struct
uint8_t brightness; // 1 byte
uint8_t effect; // 1 byte
uint8_t effect_speed; // 1 byte
- HSV color_1; // 3 bytes
- HSV color_2; // 3 bytes
- backlight_config_indicator caps_lock_indicator; // 4 bytes
- backlight_config_indicator layer_1_indicator; // 4 bytes
- backlight_config_indicator layer_2_indicator; // 4 bytes
- backlight_config_indicator layer_3_indicator; // 4 bytes
+ HS color_1; // 2 bytes
+ HS color_2; // 2 bytes
+ backlight_config_indicator caps_lock_indicator; // 3 bytes
+ backlight_config_indicator layer_1_indicator; // 3 bytes
+ backlight_config_indicator layer_2_indicator; // 3 bytes
+ backlight_config_indicator layer_3_indicator; // 3 bytes
uint16_t alphas_mods[5]; // 10 bytes
-} backlight_config; // = 37 bytes
+#if defined(RGB_BACKLIGHT_M6_B)
+ HS custom_color[6]; // 12 bytes
+#endif
+} backlight_config; // = 31 bytes (M6-B = 43 bytes)
void backlight_config_load(void);
void backlight_config_save(void);