summary refs log tree commit diff
path: root/quantum
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2021-07-01 08:22:21 -0700
committerGitHub <noreply@github.com>2021-07-01 08:22:21 -0700
commit0bde920817ef458f2ad61a66ce76a2535bbc261b (patch)
tree9c7078bd67547fc44085cec1fbfbc82a47047161 /quantum
parent8f78be076debfc073741f1bc1ba424f1271191d9 (diff)
Convert Dip Switch callbacks to boolean functions (#13399)
Diffstat (limited to 'quantum')
-rw-r--r--quantum/dip_switch.c8
-rw-r--r--quantum/dip_switch.h8
2 files changed, 8 insertions, 8 deletions
diff --git a/quantum/dip_switch.c b/quantum/dip_switch.c
index cda69bd0ef..72789ca8e8 100644
--- a/quantum/dip_switch.c
+++ b/quantum/dip_switch.c
@@ -49,13 +49,13 @@ static uint16_t       scan_count;
 static bool dip_switch_state[NUMBER_OF_DIP_SWITCHES]      = {0};
 static bool last_dip_switch_state[NUMBER_OF_DIP_SWITCHES] = {0};
 
-__attribute__((weak)) void dip_switch_update_user(uint8_t index, bool active) {}
+__attribute__((weak)) bool dip_switch_update_user(uint8_t index, bool active) { return true; }
 
-__attribute__((weak)) void dip_switch_update_kb(uint8_t index, bool active) { dip_switch_update_user(index, active); }
+__attribute__((weak)) bool dip_switch_update_kb(uint8_t index, bool active) { return dip_switch_update_user(index, active); }
 
-__attribute__((weak)) void dip_switch_update_mask_user(uint32_t state) {}
+__attribute__((weak)) bool dip_switch_update_mask_user(uint32_t state) { return true; }
 
-__attribute__((weak)) void dip_switch_update_mask_kb(uint32_t state) { dip_switch_update_mask_user(state); }
+__attribute__((weak)) bool dip_switch_update_mask_kb(uint32_t state) { return dip_switch_update_mask_user(state); }
 
 void dip_switch_init(void) {
 #ifdef DIP_SWITCH_PINS
diff --git a/quantum/dip_switch.h b/quantum/dip_switch.h
index 61ef1cc19d..058a10f41f 100644
--- a/quantum/dip_switch.h
+++ b/quantum/dip_switch.h
@@ -20,10 +20,10 @@
 
 #include "quantum.h"
 
-void dip_switch_update_kb(uint8_t index, bool active);
-void dip_switch_update_user(uint8_t index, bool active);
-void dip_switch_update_mask_user(uint32_t state);
-void dip_switch_update_mask_kb(uint32_t state);
+bool dip_switch_update_kb(uint8_t index, bool active);
+bool dip_switch_update_user(uint8_t index, bool active);
+bool dip_switch_update_mask_user(uint32_t state);
+bool dip_switch_update_mask_kb(uint32_t state);
 
 void dip_switch_init(void);
 void dip_switch_read(bool forced);