summaryrefslogtreecommitdiff
path: root/keyboards/novelkeys/nk20
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/novelkeys/nk20')
-rw-r--r--keyboards/novelkeys/nk20/config.h8
-rw-r--r--keyboards/novelkeys/nk20/info.json40
-rw-r--r--keyboards/novelkeys/nk20/nk20.c2
-rw-r--r--keyboards/novelkeys/nk20/nk20.h38
-rw-r--r--keyboards/novelkeys/nk20/rules.mk2
5 files changed, 40 insertions, 50 deletions
diff --git a/keyboards/novelkeys/nk20/config.h b/keyboards/novelkeys/nk20/config.h
index fa4ac1b65e..23b8d2915a 100644
--- a/keyboards/novelkeys/nk20/config.h
+++ b/keyboards/novelkeys/nk20/config.h
@@ -17,16 +17,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-
-#define MATRIX_ROW_PINS { B12, A5, A3, A2, A1, A0 }
-#define MATRIX_COL_PINS { B13, B14, B15, A4 }
-
-/* COL2ROW, ROW2COL*/
-#define DIODE_DIRECTION COL2ROW
-
/* RGB options */
-#define RGB_DI_PIN A7
#define WS2812_PWM_DRIVER PWMD3
#define WS2812_PWM_CHANNEL 2
#define WS2812_PWM_PAL_MODE 1
diff --git a/keyboards/novelkeys/nk20/info.json b/keyboards/novelkeys/nk20/info.json
index e50174c50a..2befadb5d0 100644
--- a/keyboards/novelkeys/nk20/info.json
+++ b/keyboards/novelkeys/nk20/info.json
@@ -8,6 +8,18 @@
"pid": "0x4E4E",
"device_version": "0.0.1"
},
+ "ws2812": {
+ "pin": "A7",
+ "driver": "pwm"
+ },
+ "rgb_matrix": {
+ "driver": "WS2812"
+ },
+ "matrix_pins": {
+ "cols": ["B13", "B14", "B15", "A4"],
+ "rows": ["B12", "A5", "A3", "A2", "A1", "A0"]
+ },
+ "diode_direction": "COL2ROW",
"processor": "STM32F072",
"bootloader": "stm32-dfu",
"layout_aliases": {
@@ -15,7 +27,33 @@
},
"layouts": {
"LAYOUT": {
- "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2, "h":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4, "h":2}, {"x":0, "y":5, "w":2}, {"x":2, "y":5}]
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0},
+ {"matrix": [0, 1], "x": 1, "y": 0},
+ {"matrix": [0, 2], "x": 2, "y": 0},
+
+ {"matrix": [1, 0], "x": 0, "y": 1},
+ {"matrix": [1, 1], "x": 1, "y": 1},
+ {"matrix": [1, 2], "x": 2, "y": 1},
+ {"matrix": [1, 3], "x": 3, "y": 1},
+
+ {"matrix": [2, 0], "x": 0, "y": 2},
+ {"matrix": [2, 1], "x": 1, "y": 2},
+ {"matrix": [2, 2], "x": 2, "y": 2},
+ {"matrix": [2, 3], "x": 3, "y": 2, "h": 2},
+
+ {"matrix": [3, 0], "x": 0, "y": 3},
+ {"matrix": [3, 1], "x": 1, "y": 3},
+ {"matrix": [3, 2], "x": 2, "y": 3},
+
+ {"matrix": [4, 0], "x": 0, "y": 4},
+ {"matrix": [4, 1], "x": 1, "y": 4},
+ {"matrix": [4, 2], "x": 2, "y": 4},
+ {"matrix": [4, 3], "x": 3, "y": 4, "h": 2},
+
+ {"matrix": [5, 0], "x": 0, "y": 5, "w": 2},
+ {"matrix": [5, 2], "x": 2, "y": 5}
+ ]
}
}
}
diff --git a/keyboards/novelkeys/nk20/nk20.c b/keyboards/novelkeys/nk20/nk20.c
index 207e2277da..23350e1037 100644
--- a/keyboards/novelkeys/nk20/nk20.c
+++ b/keyboards/novelkeys/nk20/nk20.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "nk20.h"
+#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
// clang-format off
diff --git a/keyboards/novelkeys/nk20/nk20.h b/keyboards/novelkeys/nk20/nk20.h
deleted file mode 100644
index a553a1af3e..0000000000
--- a/keyboards/novelkeys/nk20/nk20.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Copyright 2022 Yiancar
- *
- * 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 XXX KC_NO
-
-#include "quantum.h"
-
-// This a shortcut to help you visually see your layout.
-
-#define LAYOUT( \
- K00, K01, K02, \
- K10, K11, K12, K13, \
- K20, K21, K22, K23, \
- K30, K31, K32, \
- K40, K41, K42, K43, \
- K50, K52 \
-) { \
- { K00, K01, K02, XXX }, \
- { K10, K11, K12, K13 }, \
- { K20, K21, K22, K23 }, \
- { K30, K31, K32, XXX }, \
- { K40, K41, K42, K43 }, \
- { K50, XXX, K52, XXX }, \
-}
diff --git a/keyboards/novelkeys/nk20/rules.mk b/keyboards/novelkeys/nk20/rules.mk
index 96367c6a4c..131bc94a44 100644
--- a/keyboards/novelkeys/nk20/rules.mk
+++ b/keyboards/novelkeys/nk20/rules.mk
@@ -19,5 +19,3 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
RGB_MATRIX_ENABLE = yes # Enable Per-key RGB
-RGB_MATRIX_DRIVER = WS2812 # Per-key RGB Drive
-WS2812_DRIVER = pwm # Per-key RGB MCU Driver