From 23c365b023e409885e6f201f12df56e5145dde47 Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 6 Mar 2023 09:53:52 +1100 Subject: Move matrix config to info.json, part 1 (#19985) --- keyboards/4by3/config.h | 9 --------- keyboards/4by3/info.json | 5 +++++ 2 files changed, 5 insertions(+), 9 deletions(-) delete mode 100644 keyboards/4by3/config.h (limited to 'keyboards/4by3') diff --git a/keyboards/4by3/config.h b/keyboards/4by3/config.h deleted file mode 100644 index 5f20b5b97a..0000000000 --- a/keyboards/4by3/config.h +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once - - -/* key matrix pins */ -#define MATRIX_ROW_PINS { D1, D0, D4 } -#define MATRIX_COL_PINS { C6, D7, E6, B4 } - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/4by3/info.json b/keyboards/4by3/info.json index 0ed57ce2f6..ade503696c 100644 --- a/keyboards/4by3/info.json +++ b/keyboards/4by3/info.json @@ -8,6 +8,11 @@ "pid": "0x2019", "device_version": "0.0.1" }, + "matrix_pins": { + "cols": ["C6", "D7", "E6", "B4"], + "rows": ["D1", "D0", "D4"] + }, + "diode_direction": "COL2ROW", "processor": "atmega32u4", "bootloader": "caterina", "layouts": { -- cgit v1.2.3 From 02ccc50e6085a9d0a4f38f252960e2d14ffe4d1f Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 17 Mar 2023 14:02:04 +1100 Subject: Remove more empty headers (#20155) --- keyboards/4by3/4by3.c | 1 - 1 file changed, 1 deletion(-) delete mode 100644 keyboards/4by3/4by3.c (limited to 'keyboards/4by3') diff --git a/keyboards/4by3/4by3.c b/keyboards/4by3/4by3.c deleted file mode 100644 index 3ae27260d4..0000000000 --- a/keyboards/4by3/4by3.c +++ /dev/null @@ -1 +0,0 @@ -#include "4by3.h" \ No newline at end of file -- cgit v1.2.3 From 364c06d939134184838579d4e73880f8c2f83419 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 5 Apr 2023 15:46:59 +1000 Subject: Move small macropad-ish layouts to data driven (#20341) --- keyboards/4by3/4by3.h | 70 ------------------------------------------------ keyboards/4by3/info.json | 58 +++++++++++++++++++++++++++++++-------- 2 files changed, 47 insertions(+), 81 deletions(-) delete mode 100644 keyboards/4by3/4by3.h (limited to 'keyboards/4by3') diff --git a/keyboards/4by3/4by3.h b/keyboards/4by3/4by3.h deleted file mode 100644 index b41628137a..0000000000 --- a/keyboards/4by3/4by3.h +++ /dev/null @@ -1,70 +0,0 @@ -#pragma once - -#include "quantum.h" - -/* LAYOUT_horizontal - * ┌───┐ - * │USB│ - * ├───┼───┬───┬───┐ - * │K00│K01│K02│K03│ - * ├───┼───┼───┼───┤ - * │K10│K11│K12│K13│ - * ├───┼───┼───┼───┤ - * │K20│K21│K22│K23│ - * └───┴───┴───┴───┘ - */ -#define LAYOUT_horizontal( \ - K00, K01, K02, K03, \ - K10, K11, K12, K13, \ - K20, K21, K22, K23 \ -) { \ - { K00, K01, K02, K03 }, \ - { K10, K11, K12, K13 }, \ - { K20, K21, K22, K23 } \ -} - -/* LAYOUT_vertical_right - * ┌───┬───┬───┬───┐ - * │K00│K01│K03│USB│ - * ├───┼───┼───┬───┘ - * │K04│K05│K06│ - * ├───┼───┼───┤ - * │K07│K08│K09│ - * ├───┼───┼───┤ - * │K10│K11│K12│ - * └───┴───┴───┘ - */ -#define LAYOUT_vertical_right( \ - K20, K10, K00, \ - K21, K11, K01, \ - K22, K12, K02, \ - K23, K13, K03 \ -) { \ - { K00, K01, K02, K03 }, \ - { K10, K11, K12, K13 }, \ - { K20, K21, K22, K23 } \ -} - -/* LAYOUT_vertical_left - * ┌───┬───┬───┐ - * │K00│K01│K03│ - * ├───┼───┼───┤ - * │K04│K05│K06│ - * ├───┼───┼───┤ - * │K07│K08│K09│ - * ┌───┼───┼───┼───┤ - * │USB│K10│K11│K12│ - * └───┴───┴───┴───┘ - */ -#define LAYOUT_vertical_left( \ - K03, K13, K23, \ - K02, K12, K22, \ - K01, K11, K21, \ - K00, K10, K20 \ -) { \ - { K00, K01, K02, K03 }, \ - { K10, K11, K12, K13 }, \ - { K20, K21, K22, K23 } \ -} - -#define LAYOUT LAYOUT_horizontal diff --git a/keyboards/4by3/info.json b/keyboards/4by3/info.json index ade503696c..5a64ffcd53 100644 --- a/keyboards/4by3/info.json +++ b/keyboards/4by3/info.json @@ -15,28 +15,64 @@ "diode_direction": "COL2ROW", "processor": "atmega32u4", "bootloader": "caterina", + "layout_aliases": { + "LAYOUT": "LAYOUT_horizontal" + }, "layouts": { "LAYOUT_horizontal": { "layout": [ - { "x": 0, "y": 0 }, { "x": 1, "y": 0 }, { "x": 2, "y": 0 }, { "x": 3, "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 } + {"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} ] }, "LAYOUT_vertical_right": { "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": 0, "y": 2 }, { "x": 1, "y": 2 }, { "x": 2, "y": 2 }, - { "x": 0, "y": 3 }, { "x": 1, "y": 3 }, { "x": 2, "y": 3 } + {"matrix": [2, 0], "x": 0, "y": 0}, + {"matrix": [1, 0], "x": 1, "y": 0}, + {"matrix": [0, 0], "x": 2, "y": 0}, + + {"matrix": [2, 1], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [0, 1], "x": 2, "y": 1}, + + {"matrix": [2, 2], "x": 0, "y": 2}, + {"matrix": [1, 2], "x": 1, "y": 2}, + {"matrix": [0, 2], "x": 2, "y": 2}, + + {"matrix": [2, 3], "x": 0, "y": 3}, + {"matrix": [1, 3], "x": 1, "y": 3}, + {"matrix": [0, 3], "x": 2, "y": 3} ] }, "LAYOUT_vertical_left": { "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": 0, "y": 2 }, { "x": 1, "y": 2 }, { "x": 2, "y": 2 }, - { "x": 0, "y": 3 }, { "x": 1, "y": 3 }, { "x": 2, "y": 3 } + {"matrix": [0, 3], "x": 0, "y": 0}, + {"matrix": [1, 3], "x": 1, "y": 0}, + {"matrix": [2, 3], "x": 2, "y": 0}, + + {"matrix": [0, 2], "x": 0, "y": 1}, + {"matrix": [1, 2], "x": 1, "y": 1}, + {"matrix": [2, 2], "x": 2, "y": 1}, + + {"matrix": [0, 1], "x": 0, "y": 2}, + {"matrix": [1, 1], "x": 1, "y": 2}, + {"matrix": [2, 1], "x": 2, "y": 2}, + + {"matrix": [0, 0], "x": 0, "y": 3}, + {"matrix": [1, 0], "x": 1, "y": 3}, + {"matrix": [2, 0], "x": 2, "y": 3} ] } } -- cgit v1.2.3 From 108ad0929cc4dfdc4df0e9f2303b85da92606e92 Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 5 May 2023 09:28:17 +1000 Subject: Escape Unicode characters in info.json (#20698) --- keyboards/4by3/info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards/4by3') diff --git a/keyboards/4by3/info.json b/keyboards/4by3/info.json index 5a64ffcd53..faab285d2c 100644 --- a/keyboards/4by3/info.json +++ b/keyboards/4by3/info.json @@ -1,6 +1,6 @@ { "keyboard_name": "4by3", - "manufacturer": "Elias Sjögreen", + "manufacturer": "Elias Sj\u00f6green", "url": "https://github.com/eliassjogreen/4by3", "maintainer": "eliassjogreen", "usb": { -- cgit v1.2.3