diff options
Diffstat (limited to 'keyboards/handwired/arrow_pad')
-rw-r--r-- | keyboards/handwired/arrow_pad/arrow_pad.c | 1 | ||||
-rw-r--r-- | keyboards/handwired/arrow_pad/arrow_pad.h | 42 | ||||
-rw-r--r-- | keyboards/handwired/arrow_pad/config.h | 17 | ||||
-rw-r--r-- | keyboards/handwired/arrow_pad/info.json | 83 | ||||
-rw-r--r-- | keyboards/handwired/arrow_pad/keymaps/pad_21/keymap.c | 13 |
5 files changed, 47 insertions, 109 deletions
diff --git a/keyboards/handwired/arrow_pad/arrow_pad.c b/keyboards/handwired/arrow_pad/arrow_pad.c deleted file mode 100644 index 381934aa88..0000000000 --- a/keyboards/handwired/arrow_pad/arrow_pad.c +++ /dev/null @@ -1 +0,0 @@ -#include "arrow_pad.h"
\ No newline at end of file diff --git a/keyboards/handwired/arrow_pad/arrow_pad.h b/keyboards/handwired/arrow_pad/arrow_pad.h deleted file mode 100644 index 2d677beb5c..0000000000 --- a/keyboards/handwired/arrow_pad/arrow_pad.h +++ /dev/null @@ -1,42 +0,0 @@ -#pragma once - -#include "quantum.h" -#include "matrix.h" -#include "keymap.h" -#ifdef BACKLIGHT_ENABLE - #include "backlight.h" -#endif -#include <avr/io.h> -#include <stddef.h> - -#define XXX KC_NO - -// This is the 21-key keypad to 4x6 element matrix mapping -#define LAYOUT( \ - k00, k01, k02, k03, \ - k10, k11, k12, k13, \ - k20, k21, k22, k23, \ - k30, k31, k32, k33, \ - k40, k41, k42, k43, \ - k50, k51, k52, k53 \ -) { \ - { k00, k01, k02, k03 }, \ - { k10, k11, k12, k13 }, \ - { k20, k21, k22, k23 }, \ - { k30, k31, k32, k33 }, \ - { k40, k41, k42, k43 }, \ - { k50, k51, k52, k53 } \ -} - -// This is the 21-key keypad to 2x11 element matrix mapping -#define LAYOUT_pad21( \ - k00, k01, k02, k03, \ - k10, k11, k12, k13, \ - k04, k05, k06, \ - k14, k15, k16, k07, \ - k08, k09, k0A, \ - k19, k1A, k17 \ -) { \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, XXX, k19, k1A } \ -} diff --git a/keyboards/handwired/arrow_pad/config.h b/keyboards/handwired/arrow_pad/config.h index 6861311460..2ed5b28c87 100644 --- a/keyboards/handwired/arrow_pad/config.h +++ b/keyboards/handwired/arrow_pad/config.h @@ -17,23 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * -*/ -#define MATRIX_ROW_PINS { F0, F1, F4, F5, F6, F7 } -#define MATRIX_COL_PINS { B0, B1, B2, B3 } - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION ROW2COL - #define FORCE_NKRO /* diff --git a/keyboards/handwired/arrow_pad/info.json b/keyboards/handwired/arrow_pad/info.json index 8451637df5..b9d705f3bf 100644 --- a/keyboards/handwired/arrow_pad/info.json +++ b/keyboards/handwired/arrow_pad/info.json @@ -8,6 +8,11 @@ "pid": "0x4096", "device_version": "0.0.1" }, + "matrix_pins": { + "cols": ["B0", "B1", "B2", "B3"], + "rows": ["F0", "F1", "F4", "F5", "F6", "F7"] + }, + "diode_direction": "ROW2COL", "backlight": { "pin": "B7" }, @@ -16,55 +21,35 @@ "layouts": { "LAYOUT": { "layout": [ - {"label":"KM_ESC", "x":0, "y":0}, - {"label":"KM_TAB", "x":1, "y":0}, - {"label":"KM_BSL", "x":2, "y":0}, - {"label":"KM_ARR", "x":3, "y":0}, - {"label":"KM_NUM", "x":0, "y":1}, - {"label":"KM_FSL", "x":1, "y":1}, - {"label":"KM_AST", "x":2, "y":1}, - {"label":"KM_MIN", "x":3, "y":1}, - {"label":"KM___7", "x":0, "y":2}, - {"label":"KM___8", "x":1, "y":2}, - {"label":"KM___9", "x":2, "y":2}, - {"label":"KM_EQU", "x":3, "y":2}, - {"label":"KM___4", "x":0, "y":3}, - {"label":"KM___5", "x":1, "y":3}, - {"label":"KM___6", "x":2, "y":3}, - {"label":"KM_PLS", "x":3, "y":3}, - {"label":"KM___1", "x":0, "y":4}, - {"label":"KM___2", "x":1, "y":4}, - {"label":"KM___3", "x":2, "y":4}, - {"label":"___ENT", "x":3, "y":4}, - {"label":"KM___0", "x":0, "y":5}, - {"label":"_____0", "x":1, "y":5}, - {"label":"KM_DOT", "x":2, "y":5}, - {"label":"KM_ENT", "x":3, "y":5} - ] - }, - "LAYOUT_pad21": { - "layout": [ - {"label":"KM_ESC", "x":0, "y":0}, - {"label":"KM_TAB", "x":1, "y":0}, - {"label":"KM_BSL", "x":2, "y":0}, - {"label":"KM_ARR", "x":3, "y":0}, - {"label":"KM_NUM", "x":0, "y":1}, - {"label":"KM_FSL", "x":1, "y":1}, - {"label":"KM_AST", "x":2, "y":1}, - {"label":"KM_MIN", "x":3, "y":1}, - {"label":"KM___7", "x":0, "y":2}, - {"label":"KM___8", "x":1, "y":2}, - {"label":"KM___9", "x":2, "y":2}, - {"label":"KM___4", "x":0, "y":3}, - {"label":"KM___5", "x":1, "y":3}, - {"label":"KM___6", "x":2, "y":3}, - {"label":"KM_PLS", "x":3, "y":2, "h":2}, - {"label":"KM___1", "x":0, "y":4}, - {"label":"KM___2", "x":1, "y":4}, - {"label":"KM___3", "x":2, "y":4}, - {"label":"KM___0", "x":0, "y":5, "w":2}, - {"label":"KM_DOT", "x":2, "y":5}, - {"label":"KM_ENT", "x":3, "y":4, "h":2} + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 1], "x": 1, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "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}, + + {"matrix": [3, 0], "x": 0, "y": 3}, + {"matrix": [3, 1], "x": 1, "y": 3}, + {"matrix": [3, 2], "x": 2, "y": 3}, + {"matrix": [3, 3], "x": 3, "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}, + + {"matrix": [5, 0], "x": 0, "y": 5}, + {"matrix": [5, 1], "x": 1, "y": 5}, + {"matrix": [5, 2], "x": 2, "y": 5}, + {"matrix": [5, 3], "x": 3, "y": 5} ] } } diff --git a/keyboards/handwired/arrow_pad/keymaps/pad_21/keymap.c b/keyboards/handwired/arrow_pad/keymaps/pad_21/keymap.c index bc940420fe..cf291c00cf 100644 --- a/keyboards/handwired/arrow_pad/keymaps/pad_21/keymap.c +++ b/keyboards/handwired/arrow_pad/keymaps/pad_21/keymap.c @@ -2,6 +2,19 @@ #include QMK_KEYBOARD_H #include "led.h" +// This is the 21-key keypad to 2x11 element matrix mapping +#define LAYOUT_pad21( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k04, k05, k06, \ + k14, k15, k16, k07, \ + k08, k09, k0A, \ + k19, k1A, k17 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, XXX, k19, k1A } \ +} + enum layers { LAYER_BASE, LAYER_EDIT, |