diff options
Diffstat (limited to 'quantum')
| -rw-r--r-- | quantum/dip_switch.c | 8 | ||||
| -rw-r--r-- | quantum/dip_switch.h | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/quantum/dip_switch.c b/quantum/dip_switch.c index cda69bd0e..72789ca8e 100644 --- a/quantum/dip_switch.c +++ b/quantum/dip_switch.c | |||
| @@ -49,13 +49,13 @@ static uint16_t scan_count; | |||
| 49 | static bool dip_switch_state[NUMBER_OF_DIP_SWITCHES] = {0}; | 49 | static bool dip_switch_state[NUMBER_OF_DIP_SWITCHES] = {0}; |
| 50 | static bool last_dip_switch_state[NUMBER_OF_DIP_SWITCHES] = {0}; | 50 | static bool last_dip_switch_state[NUMBER_OF_DIP_SWITCHES] = {0}; |
| 51 | 51 | ||
| 52 | __attribute__((weak)) void dip_switch_update_user(uint8_t index, bool active) {} | 52 | __attribute__((weak)) bool dip_switch_update_user(uint8_t index, bool active) { return true; } |
| 53 | 53 | ||
| 54 | __attribute__((weak)) void dip_switch_update_kb(uint8_t index, bool active) { dip_switch_update_user(index, active); } | 54 | __attribute__((weak)) bool dip_switch_update_kb(uint8_t index, bool active) { return dip_switch_update_user(index, active); } |
| 55 | 55 | ||
| 56 | __attribute__((weak)) void dip_switch_update_mask_user(uint32_t state) {} | 56 | __attribute__((weak)) bool dip_switch_update_mask_user(uint32_t state) { return true; } |
| 57 | 57 | ||
| 58 | __attribute__((weak)) void dip_switch_update_mask_kb(uint32_t state) { dip_switch_update_mask_user(state); } | 58 | __attribute__((weak)) bool dip_switch_update_mask_kb(uint32_t state) { return dip_switch_update_mask_user(state); } |
| 59 | 59 | ||
| 60 | void dip_switch_init(void) { | 60 | void dip_switch_init(void) { |
| 61 | #ifdef DIP_SWITCH_PINS | 61 | #ifdef DIP_SWITCH_PINS |
diff --git a/quantum/dip_switch.h b/quantum/dip_switch.h index 61ef1cc19..058a10f41 100644 --- a/quantum/dip_switch.h +++ b/quantum/dip_switch.h | |||
| @@ -20,10 +20,10 @@ | |||
| 20 | 20 | ||
| 21 | #include "quantum.h" | 21 | #include "quantum.h" |
| 22 | 22 | ||
| 23 | void dip_switch_update_kb(uint8_t index, bool active); | 23 | bool dip_switch_update_kb(uint8_t index, bool active); |
| 24 | void dip_switch_update_user(uint8_t index, bool active); | 24 | bool dip_switch_update_user(uint8_t index, bool active); |
| 25 | void dip_switch_update_mask_user(uint32_t state); | 25 | bool dip_switch_update_mask_user(uint32_t state); |
| 26 | void dip_switch_update_mask_kb(uint32_t state); | 26 | bool dip_switch_update_mask_kb(uint32_t state); |
| 27 | 27 | ||
| 28 | void dip_switch_init(void); | 28 | void dip_switch_init(void); |
| 29 | void dip_switch_read(bool forced); | 29 | void dip_switch_read(bool forced); |
