aboutsummaryrefslogtreecommitdiff
path: root/keyboards/switchplate
diff options
context:
space:
mode:
authorJoel Challis <[email protected]>2024-06-22 09:10:12 +0100
committerGitHub <[email protected]>2024-06-22 09:10:12 +0100
commit99aa4f5191ae0e120503385869b3b24baeaf223a (patch)
treec36b9d15fb613e9358d278c4e63da852c82a2e0f /keyboards/switchplate
parent35f0a1767981f0b490858c68cb5b23ee92327a25 (diff)
downloadqmk_firmware-99aa4f5191ae0e120503385869b3b24baeaf223a.tar.gz
qmk_firmware-99aa4f5191ae0e120503385869b3b24baeaf223a.zip
Migrate `led_update_kb` implementations to DD (#23980)
Diffstat (limited to 'keyboards/switchplate')
-rw-r--r--keyboards/switchplate/southpaw_65/keyboard.json4
-rw-r--r--keyboards/switchplate/southpaw_65/southpaw_65.c30
-rw-r--r--keyboards/switchplate/southpaw_fullsize/keyboard.json6
-rw-r--r--keyboards/switchplate/southpaw_fullsize/southpaw_fullsize.c51
4 files changed, 10 insertions, 81 deletions
diff --git a/keyboards/switchplate/southpaw_65/keyboard.json b/keyboards/switchplate/southpaw_65/keyboard.json
index e4090e49c7..72c4c71097 100644
--- a/keyboards/switchplate/southpaw_65/keyboard.json
+++ b/keyboards/switchplate/southpaw_65/keyboard.json
@@ -29,6 +29,10 @@
"pin": "B5",
"levels": 10
},
+ "indicators": {
+ "caps_lock": "B6",
+ "on_state": 0
+ },
"rgblight": {
"led_count": 9,
"animations": {
diff --git a/keyboards/switchplate/southpaw_65/southpaw_65.c b/keyboards/switchplate/southpaw_65/southpaw_65.c
deleted file mode 100644
index dfe3665928..0000000000
--- a/keyboards/switchplate/southpaw_65/southpaw_65.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Copyright 2019
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-#include "quantum.h"
-
-void keyboard_pre_init_kb(void) {
- gpio_set_pin_output(B6);
-
- keyboard_pre_init_user();
-}
-
-bool led_update_kb(led_t led_state) {
- bool res = led_update_user(led_state);
- if(res) {
- gpio_write_pin(B6, !led_state.caps_lock);
- }
- return res;
-}
diff --git a/keyboards/switchplate/southpaw_fullsize/keyboard.json b/keyboards/switchplate/southpaw_fullsize/keyboard.json
index ad897821c3..84942ccfa4 100644
--- a/keyboards/switchplate/southpaw_fullsize/keyboard.json
+++ b/keyboards/switchplate/southpaw_fullsize/keyboard.json
@@ -31,6 +31,12 @@
"backlight": {
"pin": "B7"
},
+ "indicators": {
+ "caps_lock": "D4",
+ "num_lock": "D3",
+ "scroll_lock": "D5",
+ "on_state": 0
+ },
"processor": "at90usb1286",
"bootloader": "atmel-dfu",
"layouts": {
diff --git a/keyboards/switchplate/southpaw_fullsize/southpaw_fullsize.c b/keyboards/switchplate/southpaw_fullsize/southpaw_fullsize.c
deleted file mode 100644
index 3d77e8722e..0000000000
--- a/keyboards/switchplate/southpaw_fullsize/southpaw_fullsize.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Copyright 2020 Ryota Goto
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "quantum.h"
-
-// Optional override functions below.
-// You can leave any or all of these undefined.
-// These are only required if you want to perform custom actions.
-
-#define INDICATOR_NUM D3
-#define INDICATOR_CAPS D4
-#define INDICATOR_SCR D5
-
-
-void matrix_init_kb(void) {
- // put your keyboard start-up code here
- // runs once when the firmware starts up
-
- // D3 Numlock, D4 Capslock, D5 Scrlock
- gpio_set_pin_output(INDICATOR_NUM);
- gpio_set_pin_output(INDICATOR_CAPS);
- gpio_set_pin_output(INDICATOR_SCR);
-
- matrix_init_user();
-}
-
-bool led_update_kb(led_t led_state) {
- // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
- bool res = led_update_user(led_state);
- if (res)
- {
- gpio_write_pin(INDICATOR_NUM, !led_state.num_lock);
- gpio_write_pin(INDICATOR_CAPS, !led_state.caps_lock);
- gpio_write_pin(INDICATOR_SCR, !led_state.scroll_lock);
- }
- return res;
-}
-