From d7f1e072a859d7fcbaccd675b4bad7d02d214e52 Mon Sep 17 00:00:00 2001 From: Wilba Date: Sat, 1 Dec 2018 03:43:34 +1100 Subject: 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 --- keyboards/zeal60/rgb_backlight.h | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'keyboards/zeal60/rgb_backlight.h') 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); -- cgit v1.2.3-24-g4f1b