summaryrefslogtreecommitdiff
path: root/quantum/rgb_matrix
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@drashna.net>2023-05-08 10:56:03 -0700
committerGitHub <noreply@github.com>2023-05-08 10:56:03 -0700
commit5c4b53a1437adde49871752d8015bfc042b97c20 (patch)
treee67534e42cf3cdf95df869f8f66e23cfeba78524 /quantum/rgb_matrix
parent01be98184363591656ed6bd5baac21e6a5d61132 (diff)
[Bug] Realign and size check EECONFIG structures (#20541)
Co-authored-by: Nick Brassel <nick@tzarc.org>
Diffstat (limited to 'quantum/rgb_matrix')
-rw-r--r--quantum/rgb_matrix/rgb_matrix_types.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/quantum/rgb_matrix/rgb_matrix_types.h b/quantum/rgb_matrix/rgb_matrix_types.h
index eea603c41c..53ff7321b8 100644
--- a/quantum/rgb_matrix/rgb_matrix_types.h
+++ b/quantum/rgb_matrix/rgb_matrix_types.h
@@ -83,16 +83,18 @@ typedef struct PACKED {
} led_config_t;
typedef union {
- uint32_t raw;
+ uint64_t raw;
struct PACKED {
uint8_t enable : 2;
uint8_t mode : 6;
HSV hsv;
- uint8_t speed; // EECONFIG needs to be increased to support this
+ uint8_t speed;
led_flags_t flags;
};
} rgb_config_t;
+_Static_assert(sizeof(rgb_config_t) == sizeof(uint64_t), "RGB Matrix EECONFIG out of spec.");
+
#if defined(_MSC_VER)
# pragma pack(pop)
#endif