summaryrefslogtreecommitdiff
path: root/quantum/dip_switch.h
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2023-12-11 23:06:18 +0000
committerGitHub <noreply@github.com>2023-12-11 23:06:18 +0000
commit4682226e20d17437c0a6f67f5d6160432074d948 (patch)
tree94a85cb8b8ae55c8f3db7ab09d8af13d66bf0bfa /quantum/dip_switch.h
parentd85f954d3065da06e0c7eb14068d61f18b23bd25 (diff)
Keymap introspection for Dip Switches (#22543)
Diffstat (limited to 'quantum/dip_switch.h')
-rw-r--r--quantum/dip_switch.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/quantum/dip_switch.h b/quantum/dip_switch.h
index ee5b550ada..7629859359 100644
--- a/quantum/dip_switch.h
+++ b/quantum/dip_switch.h
@@ -46,3 +46,10 @@ void dip_switch_read(bool forced);
void dip_switch_init(void);
void dip_switch_task(void);
+
+#ifdef DIP_SWITCH_MAP_ENABLE
+# define NUM_DIP_STATES 2
+# define DIP_SWITCH_OFF_ON(off, on) \
+ { (off), (on) }
+extern const uint16_t dip_switch_map[NUM_DIP_SWITCHES][NUM_DIP_STATES];
+#endif // DIP_SWITCH_MAP_ENABLE