aboutsummaryrefslogtreecommitdiff
path: root/keyboards/matrix
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/matrix
parent35f0a1767981f0b490858c68cb5b23ee92327a25 (diff)
downloadqmk_firmware-99aa4f5191ae0e120503385869b3b24baeaf223a.tar.gz
qmk_firmware-99aa4f5191ae0e120503385869b3b24baeaf223a.zip
Migrate `led_update_kb` implementations to DD (#23980)
Diffstat (limited to 'keyboards/matrix')
-rw-r--r--keyboards/matrix/cain_re/cain_re.c40
-rw-r--r--keyboards/matrix/cain_re/config.h24
-rw-r--r--keyboards/matrix/cain_re/keyboard.json5
-rw-r--r--keyboards/matrix/m12og/rev2/keyboard.json6
-rw-r--r--keyboards/matrix/m12og/rev2/rev2.c23
5 files changed, 11 insertions, 87 deletions
diff --git a/keyboards/matrix/cain_re/cain_re.c b/keyboards/matrix/cain_re/cain_re.c
deleted file mode 100644
index 6dc24f2292..0000000000
--- a/keyboards/matrix/cain_re/cain_re.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * cain_re.c
- *
- Copyright 2020 astro <[email protected]>
-
- 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 matrix_init_kb(void)
-{
- gpio_set_pin_output(NUM_PIN);
- gpio_set_pin_output(CAPS_PIN);
- gpio_set_pin_output(SCROLL_PIN);
-
- matrix_init_user();
-}
-
-bool led_update_kb(led_t led_state)
-{
- bool res = led_update_user(led_state);
- if (res) {
- gpio_write_pin(NUM_PIN, led_state.num_lock);
- gpio_write_pin(CAPS_PIN, led_state.caps_lock);
- gpio_write_pin(SCROLL_PIN, led_state.scroll_lock);
- }
- return res;
-}
diff --git a/keyboards/matrix/cain_re/config.h b/keyboards/matrix/cain_re/config.h
deleted file mode 100644
index 9469d689d0..0000000000
--- a/keyboards/matrix/cain_re/config.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * config.h
- *
- Copyright 2020 astro <[email protected]>
-
- 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/>.
- */
-
-#pragma once
-
-#define CAPS_PIN D3
-#define NUM_PIN F7
-#define SCROLL_PIN B0
diff --git a/keyboards/matrix/cain_re/keyboard.json b/keyboards/matrix/cain_re/keyboard.json
index 02c6cbbeb5..7d93e806c2 100644
--- a/keyboards/matrix/cain_re/keyboard.json
+++ b/keyboards/matrix/cain_re/keyboard.json
@@ -8,6 +8,11 @@
"pid": "0x0106",
"device_version": "0.0.1"
},
+ "indicators": {
+ "caps_lock": "D3",
+ "num_lock": "F7",
+ "scroll_lock": "B0"
+ },
"rgblight": {
"saturation_steps": 8,
"brightness_steps": 8,
diff --git a/keyboards/matrix/m12og/rev2/keyboard.json b/keyboards/matrix/m12og/rev2/keyboard.json
index 42df6a75e8..45fcffe9eb 100644
--- a/keyboards/matrix/m12og/rev2/keyboard.json
+++ b/keyboards/matrix/m12og/rev2/keyboard.json
@@ -8,6 +8,12 @@
"pid": "0x8712",
"device_version": "0.0.1"
},
+ "indicators": {
+ "caps_lock": "C6",
+ "num_lock": "B1",
+ "scroll_lock": "B2",
+ "on_state": 0
+ },
"rgblight": {
"saturation_steps": 8,
"brightness_steps": 8,
diff --git a/keyboards/matrix/m12og/rev2/rev2.c b/keyboards/matrix/m12og/rev2/rev2.c
deleted file mode 100644
index e64640b2d2..0000000000
--- a/keyboards/matrix/m12og/rev2/rev2.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * rev2.c
- */
-
-#include "quantum.h"
-
-void matrix_init_kb(void) {
- gpio_set_pin_output(C6);
- gpio_set_pin_output(B2);
- gpio_set_pin_output(B1);
-
- matrix_init_user();
-}
-
-bool led_update_kb(led_t led_state) {
- bool res = led_update_user(led_state);
- if (res) {
- gpio_write_pin(B1, !led_state.num_lock);
- gpio_write_pin(C6, !led_state.caps_lock);
- gpio_write_pin(B2, !led_state.scroll_lock);
- }
- return res;
-}