summary refs log tree commit diff
path: root/quantum/haptic.h
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/haptic.h
parent01be98184363591656ed6bd5baac21e6a5d61132 (diff)
[Bug] Realign and size check EECONFIG structures (#20541)
Co-authored-by: Nick Brassel <nick@tzarc.org>
Diffstat (limited to 'quantum/haptic.h')
-rw-r--r--quantum/haptic.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/quantum/haptic.h b/quantum/haptic.h
index 7d70a01333..71d95cc61b 100644
--- a/quantum/haptic.h
+++ b/quantum/haptic.h
@@ -31,16 +31,18 @@ typedef union {
     uint32_t raw;
     struct {
         bool    enable : 1;
-        uint8_t feedback : 2;
         uint8_t mode : 7;
         bool    buzz : 1;
         uint8_t dwell : 7;
-        bool    cont : 1;
         uint8_t amplitude : 8;
+        uint8_t feedback : 2;
+        bool    cont : 1;
         uint8_t reserved : 5;
     };
 } haptic_config_t;
 
+_Static_assert(sizeof(haptic_config_t) == sizeof(uint32_t), "Haptic EECONFIG out of spec.");
+
 typedef enum HAPTIC_FEEDBACK {
     KEY_PRESS,
     KEY_PRESS_RELEASE,