summaryrefslogtreecommitdiff
path: root/keyboards/planck
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 /keyboards/planck
parent8f78be076debfc073741f1bc1ba424f1271191d9 (diff)
Convert Dip Switch callbacks to boolean functions (#13399)
Diffstat (limited to 'keyboards/planck')
-rw-r--r--keyboards/planck/keymaps/abishalom/keymap.c3
-rw-r--r--keyboards/planck/keymaps/atreus/keymap.c3
-rw-r--r--keyboards/planck/keymaps/dear_vehicle_owner/keymap.c3
-rw-r--r--keyboards/planck/keymaps/default/keymap.c3
-rw-r--r--keyboards/planck/keymaps/gitdrik/keymap.c3
-rw-r--r--keyboards/planck/keymaps/grant24/keymap.c3
-rw-r--r--keyboards/planck/keymaps/hvp/keymap.c3
-rw-r--r--keyboards/planck/keymaps/jdelkins/keymap.c3
-rw-r--r--keyboards/planck/keymaps/lja83/keymap.c3
-rw-r--r--keyboards/planck/keymaps/mjuma/keymap.c3
-rw-r--r--keyboards/planck/keymaps/rjhilgefort/keymap.c3
-rw-r--r--keyboards/planck/rev6/rev6.c6
-rw-r--r--keyboards/planck/thk/keymaps/thk/keymap.c3
13 files changed, 27 insertions, 15 deletions
diff --git a/keyboards/planck/keymaps/abishalom/keymap.c b/keyboards/planck/keymaps/abishalom/keymap.c
index bd53cfb7af..e2ca81cc06 100644
--- a/keyboards/planck/keymaps/abishalom/keymap.c
+++ b/keyboards/planck/keymaps/abishalom/keymap.c
@@ -254,7 +254,7 @@ bool encoder_update(bool clockwise) {
return true;
}
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0: {
#ifdef AUDIO_ENABLE
@@ -283,6 +283,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
muse_mode = false;
}
}
+ return true;
}
void matrix_scan_user(void) {
diff --git a/keyboards/planck/keymaps/atreus/keymap.c b/keyboards/planck/keymaps/atreus/keymap.c
index c9a721a1fa..ce3d254d42 100644
--- a/keyboards/planck/keymaps/atreus/keymap.c
+++ b/keyboards/planck/keymaps/atreus/keymap.c
@@ -177,7 +177,7 @@ bool encoder_update(bool clockwise) {
return true;
}
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0: {
#ifdef AUDIO_ENABLE
@@ -206,6 +206,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
muse_mode = false;
}
}
+ return true;
}
void matrix_scan_user(void) {
diff --git a/keyboards/planck/keymaps/dear_vehicle_owner/keymap.c b/keyboards/planck/keymaps/dear_vehicle_owner/keymap.c
index aec7bcdd7d..d83df6d4b1 100644
--- a/keyboards/planck/keymaps/dear_vehicle_owner/keymap.c
+++ b/keyboards/planck/keymaps/dear_vehicle_owner/keymap.c
@@ -296,7 +296,7 @@ bool encoder_update(bool clockwise) {
return true;
}
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0: {
#ifdef AUDIO_ENABLE
@@ -325,6 +325,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
muse_mode = false;
}
}
+ return true;
}
void matrix_scan_user(void) {
diff --git a/keyboards/planck/keymaps/default/keymap.c b/keyboards/planck/keymaps/default/keymap.c
index 304d320b69..644dae6b99 100644
--- a/keyboards/planck/keymaps/default/keymap.c
+++ b/keyboards/planck/keymaps/default/keymap.c
@@ -289,7 +289,7 @@ bool encoder_update(bool clockwise) {
return true;
}
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0: {
#ifdef AUDIO_ENABLE
@@ -318,6 +318,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
muse_mode = false;
}
}
+ return true;
}
void matrix_scan_user(void) {
diff --git a/keyboards/planck/keymaps/gitdrik/keymap.c b/keyboards/planck/keymaps/gitdrik/keymap.c
index 9cc5f7517f..e3e03929a1 100644
--- a/keyboards/planck/keymaps/gitdrik/keymap.c
+++ b/keyboards/planck/keymaps/gitdrik/keymap.c
@@ -170,7 +170,7 @@ bool encoder_update(bool clockwise) {
return true;
}
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0: {
#ifdef AUDIO_ENABLE
@@ -199,6 +199,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
muse_mode = false;
}
}
+ return true;
}
void matrix_scan_user(void) {
diff --git a/keyboards/planck/keymaps/grant24/keymap.c b/keyboards/planck/keymaps/grant24/keymap.c
index 7ed9a794e4..469cf08c70 100644
--- a/keyboards/planck/keymaps/grant24/keymap.c
+++ b/keyboards/planck/keymaps/grant24/keymap.c
@@ -312,7 +312,7 @@ bool encoder_update(bool clockwise) {
return true;
}
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0: {
#ifdef AUDIO_ENABLE
@@ -341,6 +341,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
muse_mode = false;
}
}
+ return true;
}
void matrix_scan_user(void) {
diff --git a/keyboards/planck/keymaps/hvp/keymap.c b/keyboards/planck/keymaps/hvp/keymap.c
index 1af3771ae0..c8325b6468 100644
--- a/keyboards/planck/keymaps/hvp/keymap.c
+++ b/keyboards/planck/keymaps/hvp/keymap.c
@@ -122,7 +122,7 @@ bool encoder_update(bool clockwise) {
return true;
}
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0: {
#ifdef AUDIO_ENABLE
@@ -151,6 +151,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
muse_mode = false;
}
}
+ return true;
}
void matrix_scan_user(void) {
diff --git a/keyboards/planck/keymaps/jdelkins/keymap.c b/keyboards/planck/keymaps/jdelkins/keymap.c
index 3d109e9e8c..620c36129f 100644
--- a/keyboards/planck/keymaps/jdelkins/keymap.c
+++ b/keyboards/planck/keymaps/jdelkins/keymap.c
@@ -291,7 +291,7 @@ void encoder_update(bool clockwise) {
}
}
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0: {
#ifdef AUDIO_ENABLE
@@ -320,6 +320,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
muse_mode = false;
}
}
+ return true;
}
void keyboard_post_init_keymap(void) {
diff --git a/keyboards/planck/keymaps/lja83/keymap.c b/keyboards/planck/keymaps/lja83/keymap.c
index d42c5b645e..2b4b9adcc2 100644
--- a/keyboards/planck/keymaps/lja83/keymap.c
+++ b/keyboards/planck/keymaps/lja83/keymap.c
@@ -299,7 +299,7 @@ bool encoder_update_user(uint16_t index, bool clockwise) {
return true;
}
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0: {
#ifdef AUDIO_ENABLE
@@ -328,6 +328,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
muse_mode = false;
}
}
+ return true;
}
void matrix_scan_user(void) {
diff --git a/keyboards/planck/keymaps/mjuma/keymap.c b/keyboards/planck/keymaps/mjuma/keymap.c
index 2204fb2881..8aaa05864f 100644
--- a/keyboards/planck/keymaps/mjuma/keymap.c
+++ b/keyboards/planck/keymaps/mjuma/keymap.c
@@ -190,7 +190,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 1:
if (active) {
@@ -199,6 +199,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
muse_mode = false;
}
}
+ return true;
}
void matrix_scan_user(void) {
diff --git a/keyboards/planck/keymaps/rjhilgefort/keymap.c b/keyboards/planck/keymaps/rjhilgefort/keymap.c
index d832e70515..9eb178823c 100644
--- a/keyboards/planck/keymaps/rjhilgefort/keymap.c
+++ b/keyboards/planck/keymaps/rjhilgefort/keymap.c
@@ -187,7 +187,7 @@ bool encoder_update(bool clockwise) {
return true;
}
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0: {
#ifdef AUDIO_ENABLE
@@ -216,6 +216,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
muse_mode = false;
}
}
+ return true;
}
void matrix_scan_user(void) {
diff --git a/keyboards/planck/rev6/rev6.c b/keyboards/planck/rev6/rev6.c
index 4f2ff86812..e6c49ae1c8 100644
--- a/keyboards/planck/rev6/rev6.c
+++ b/keyboards/planck/rev6/rev6.c
@@ -61,10 +61,10 @@ void matrix_scan_kb(void) {
#ifdef DIP_SWITCH_ENABLE
__attribute__((weak))
-void dip_update(uint8_t index, bool active) {}
+bool dip_update(uint8_t index, bool active) { return true; }
__attribute__((weak))
-void dip_switch_update_user(uint8_t index, bool active) {
- dip_update(index, active);
+bool dip_switch_update_user(uint8_t index, bool active) {
+ return dip_update(index, active);
}
#endif
diff --git a/keyboards/planck/thk/keymaps/thk/keymap.c b/keyboards/planck/thk/keymaps/thk/keymap.c
index 948393b532..ae2420250e 100644
--- a/keyboards/planck/thk/keymaps/thk/keymap.c
+++ b/keyboards/planck/thk/keymaps/thk/keymap.c
@@ -213,7 +213,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
return true;
}
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0: {
if (active) {
@@ -237,4 +237,5 @@ void dip_switch_update_user(uint8_t index, bool active) {
SEND_STRING("This is a Planck THK");
break;
}
+ return true;
}