From 5bd68e3695a82ff504c358c33445b4530c2a327f Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 12 Apr 2023 13:42:51 +1000 Subject: Move single `LAYOUT`s to data driven (#20365) --- keyboards/orthodox/rev1/info.json | 59 ++++++++++++++++++++++++--- keyboards/orthodox/rev1/rev1.c | 2 +- keyboards/orthodox/rev1/rev1.h | 38 ----------------- keyboards/orthodox/rev3/info.json | 59 ++++++++++++++++++++++++--- keyboards/orthodox/rev3/rev3.c | 2 +- keyboards/orthodox/rev3/rev3.h | 38 ----------------- keyboards/orthodox/rev3_teensy/info.json | 61 ++++++++++++++++++++++++---- keyboards/orthodox/rev3_teensy/rev3_teensy.c | 2 +- keyboards/orthodox/rev3_teensy/rev3_teensy.h | 38 ----------------- 9 files changed, 163 insertions(+), 136 deletions(-) delete mode 100644 keyboards/orthodox/rev1/rev1.h delete mode 100644 keyboards/orthodox/rev3/rev3.h delete mode 100644 keyboards/orthodox/rev3_teensy/rev3_teensy.h (limited to 'keyboards/orthodox') diff --git a/keyboards/orthodox/rev1/info.json b/keyboards/orthodox/rev1/info.json index 0200ccdc5c..042187b8bf 100644 --- a/keyboards/orthodox/rev1/info.json +++ b/keyboards/orthodox/rev1/info.json @@ -20,14 +20,61 @@ "layouts": { "LAYOUT": { "layout": [ - {"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, - {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":16, "y":0}, {"x":17, "y":0}, {"x":18, "y":0}, + {"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": [0, 4], "x": 4, "y": 0}, + {"matrix": [0, 5], "x": 5, "y": 0}, - {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":7, "y":2.75, "h":1.25}, {"x":8, "y":2.75, "h":1.25}, - {"x":10, "y":2.75, "h":1.25}, {"x":11, "y":2.75, "h":1.25}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, {"x":16, "y":1}, {"x":17, "y":1}, {"x":18, "y":1}, + {"matrix": [3, 5], "x": 13, "y": 0}, + {"matrix": [3, 4], "x": 14, "y": 0}, + {"matrix": [3, 3], "x": 15, "y": 0}, + {"matrix": [3, 2], "x": 16, "y": 0}, + {"matrix": [3, 1], "x": 17, "y": 0}, + {"matrix": [3, 0], "x": 18, "y": 0}, - {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":3.75, "h":1.25}, {"x":7, "y":4}, {"x":8, "y":4}, - {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":3.75, "h":1.25}, {"x":13, "y":2}, {"x":14, "y":2}, {"x":15, "y":2}, {"x":16, "y":2}, {"x":17, "y":2}, {"x":18, "y":2} + {"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": [1, 4], "x": 4, "y": 1}, + {"matrix": [1, 5], "x": 5, "y": 1}, + + {"matrix": [1, 6], "x": 7, "y": 2.75, "h": 1.25}, + {"matrix": [1, 8], "x": 8, "y": 2.75, "h": 1.25}, + + {"matrix": [4, 8], "x": 10, "y": 2.75, "h": 1.25}, + {"matrix": [4, 6], "x": 11, "y": 2.75, "h": 1.25}, + + {"matrix": [4, 5], "x": 13, "y": 1}, + {"matrix": [4, 4], "x": 14, "y": 1}, + {"matrix": [4, 3], "x": 15, "y": 1}, + {"matrix": [4, 2], "x": 16, "y": 1}, + {"matrix": [4, 1], "x": 17, "y": 1}, + {"matrix": [4, 0], "x": 18, "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": [2, 4], "x": 4, "y": 2}, + {"matrix": [2, 5], "x": 5, "y": 2}, + + {"matrix": [2, 6], "x": 6, "y": 3.75, "h": 1.25}, + {"matrix": [2, 7], "x": 7, "y": 4}, + {"matrix": [2, 8], "x": 8, "y": 4}, + + {"matrix": [5, 8], "x": 10, "y": 4}, + {"matrix": [5, 7], "x": 11, "y": 4}, + {"matrix": [5, 6], "x": 12, "y": 3.75, "h": 1.25}, + + {"matrix": [5, 5], "x": 13, "y": 2}, + {"matrix": [5, 4], "x": 14, "y": 2}, + {"matrix": [5, 3], "x": 15, "y": 2}, + {"matrix": [5, 2], "x": 16, "y": 2}, + {"matrix": [5, 1], "x": 17, "y": 2}, + {"matrix": [5, 0], "x": 18, "y": 2} ] } } diff --git a/keyboards/orthodox/rev1/rev1.c b/keyboards/orthodox/rev1/rev1.c index 1101f4379b..ecdae6b48d 100644 --- a/keyboards/orthodox/rev1/rev1.c +++ b/keyboards/orthodox/rev1/rev1.c @@ -19,7 +19,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "rev1.h" +#include "quantum.h" #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) diff --git a/keyboards/orthodox/rev1/rev1.h b/keyboards/orthodox/rev1/rev1.h deleted file mode 100644 index 328cb46cc1..0000000000 --- a/keyboards/orthodox/rev1/rev1.h +++ /dev/null @@ -1,38 +0,0 @@ -/* -This is the header file for the subproject - -Copyright 2012 Jun Wako -Copyright 2015 Jack Humbert -Copyright 2017 Art Ortenburger - -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 . -*/ - -#pragma once - -#include "quantum.h" - -#define LAYOUT( \ - L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ - L10, L11, L12, L13, L14, L15, L16, L18, R10, R12, R13, R14, R15, R16, R17, R18, \ - L20, L21, L22, L23, L24, L25, L26, L27, L28, R20, R21, R22, R23, R24, R25, R26, R27, R28 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05 }, \ - { L10, L11, L12, L13, L14, L15, L16, KC_NO, L18}, \ - { L20, L21, L22, L23, L24, L25, L26, L27, L28 }, \ - { R05, R04, R03, R02, R01, R00 }, \ - { R18, R17, R16, R15, R14, R13, R12, KC_NO, R10 }, \ - { R28, R27, R26, R25, R24, R23, R22, R21, R20 } \ - } diff --git a/keyboards/orthodox/rev3/info.json b/keyboards/orthodox/rev3/info.json index 0681d736f9..e2b3abd34d 100644 --- a/keyboards/orthodox/rev3/info.json +++ b/keyboards/orthodox/rev3/info.json @@ -20,14 +20,61 @@ "layouts": { "LAYOUT": { "layout": [ - {"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, - {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":16, "y":0}, {"x":17, "y":0}, {"x":18, "y":0}, + {"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": [0, 4], "x": 4, "y": 0}, + {"matrix": [0, 5], "x": 5, "y": 0}, - {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":7, "y":2.75, "h":1.25}, {"x":8, "y":2.75, "h":1.25}, - {"x":10, "y":2.75, "h":1.25}, {"x":11, "y":2.75, "h":1.25}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, {"x":16, "y":1}, {"x":17, "y":1}, {"x":18, "y":1}, + {"matrix": [3, 5], "x": 13, "y": 0}, + {"matrix": [3, 4], "x": 14, "y": 0}, + {"matrix": [3, 3], "x": 15, "y": 0}, + {"matrix": [3, 2], "x": 16, "y": 0}, + {"matrix": [3, 1], "x": 17, "y": 0}, + {"matrix": [3, 0], "x": 18, "y": 0}, - {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":3.75, "h":1.25}, {"x":7, "y":4}, {"x":8, "y":4}, - {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":3.75, "h":1.25}, {"x":13, "y":2}, {"x":14, "y":2}, {"x":15, "y":2}, {"x":16, "y":2}, {"x":17, "y":2}, {"x":18, "y":2} + {"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": [1, 4], "x": 4, "y": 1}, + {"matrix": [1, 5], "x": 5, "y": 1}, + + {"matrix": [1, 6], "x": 7, "y": 2.75, "h": 1.25}, + {"matrix": [1, 8], "x": 8, "y": 2.75, "h": 1.25}, + + {"matrix": [4, 8], "x": 10, "y": 2.75, "h": 1.25}, + {"matrix": [4, 6], "x": 11, "y": 2.75, "h": 1.25}, + + {"matrix": [4, 5], "x": 13, "y": 1}, + {"matrix": [4, 4], "x": 14, "y": 1}, + {"matrix": [4, 3], "x": 15, "y": 1}, + {"matrix": [4, 2], "x": 16, "y": 1}, + {"matrix": [4, 1], "x": 17, "y": 1}, + {"matrix": [4, 0], "x": 18, "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": [2, 4], "x": 4, "y": 2}, + {"matrix": [2, 5], "x": 5, "y": 2}, + + {"matrix": [2, 6], "x": 6, "y": 3.75, "h": 1.25}, + {"matrix": [2, 7], "x": 7, "y": 4}, + {"matrix": [2, 8], "x": 8, "y": 4}, + + {"matrix": [5, 8], "x": 10, "y": 4}, + {"matrix": [5, 7], "x": 11, "y": 4}, + {"matrix": [5, 6], "x": 12, "y": 3.75, "h": 1.25}, + + {"matrix": [5, 5], "x": 13, "y": 2}, + {"matrix": [5, 4], "x": 14, "y": 2}, + {"matrix": [5, 3], "x": 15, "y": 2}, + {"matrix": [5, 2], "x": 16, "y": 2}, + {"matrix": [5, 1], "x": 17, "y": 2}, + {"matrix": [5, 0], "x": 18, "y": 2} ] } } diff --git a/keyboards/orthodox/rev3/rev3.c b/keyboards/orthodox/rev3/rev3.c index 79af5cd668..ecdae6b48d 100644 --- a/keyboards/orthodox/rev3/rev3.c +++ b/keyboards/orthodox/rev3/rev3.c @@ -19,7 +19,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "rev3.h" +#include "quantum.h" #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) diff --git a/keyboards/orthodox/rev3/rev3.h b/keyboards/orthodox/rev3/rev3.h deleted file mode 100644 index 328cb46cc1..0000000000 --- a/keyboards/orthodox/rev3/rev3.h +++ /dev/null @@ -1,38 +0,0 @@ -/* -This is the header file for the subproject - -Copyright 2012 Jun Wako -Copyright 2015 Jack Humbert -Copyright 2017 Art Ortenburger - -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 . -*/ - -#pragma once - -#include "quantum.h" - -#define LAYOUT( \ - L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ - L10, L11, L12, L13, L14, L15, L16, L18, R10, R12, R13, R14, R15, R16, R17, R18, \ - L20, L21, L22, L23, L24, L25, L26, L27, L28, R20, R21, R22, R23, R24, R25, R26, R27, R28 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05 }, \ - { L10, L11, L12, L13, L14, L15, L16, KC_NO, L18}, \ - { L20, L21, L22, L23, L24, L25, L26, L27, L28 }, \ - { R05, R04, R03, R02, R01, R00 }, \ - { R18, R17, R16, R15, R14, R13, R12, KC_NO, R10 }, \ - { R28, R27, R26, R25, R24, R23, R22, R21, R20 } \ - } diff --git a/keyboards/orthodox/rev3_teensy/info.json b/keyboards/orthodox/rev3_teensy/info.json index 9a292b0f74..345ff58145 100644 --- a/keyboards/orthodox/rev3_teensy/info.json +++ b/keyboards/orthodox/rev3_teensy/info.json @@ -16,18 +16,65 @@ "soft_serial_pin": "D0" }, "processor": "atmega32u4", - "bootloader": "halfkay", + "bootloader": "halfkay", "layouts": { "LAYOUT": { "layout": [ - {"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, - {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":16, "y":0}, {"x":17, "y":0}, {"x":18, "y":0}, + {"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": [0, 4], "x": 4, "y": 0}, + {"matrix": [0, 5], "x": 5, "y": 0}, - {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":7, "y":2.75, "h":1.25}, {"x":8, "y":2.75, "h":1.25}, - {"x":10, "y":2.75, "h":1.25}, {"x":11, "y":2.75, "h":1.25}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, {"x":16, "y":1}, {"x":17, "y":1}, {"x":18, "y":1}, + {"matrix": [3, 5], "x": 13, "y": 0}, + {"matrix": [3, 4], "x": 14, "y": 0}, + {"matrix": [3, 3], "x": 15, "y": 0}, + {"matrix": [3, 2], "x": 16, "y": 0}, + {"matrix": [3, 1], "x": 17, "y": 0}, + {"matrix": [3, 0], "x": 18, "y": 0}, - {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":3.75, "h":1.25}, {"x":7, "y":4}, {"x":8, "y":4}, - {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":3.75, "h":1.25}, {"x":13, "y":2}, {"x":14, "y":2}, {"x":15, "y":2}, {"x":16, "y":2}, {"x":17, "y":2}, {"x":18, "y":2} + {"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": [1, 4], "x": 4, "y": 1}, + {"matrix": [1, 5], "x": 5, "y": 1}, + + {"matrix": [1, 6], "x": 7, "y": 2.75, "h": 1.25}, + {"matrix": [1, 8], "x": 8, "y": 2.75, "h": 1.25}, + + {"matrix": [4, 8], "x": 10, "y": 2.75, "h": 1.25}, + {"matrix": [4, 6], "x": 11, "y": 2.75, "h": 1.25}, + + {"matrix": [4, 5], "x": 13, "y": 1}, + {"matrix": [4, 4], "x": 14, "y": 1}, + {"matrix": [4, 3], "x": 15, "y": 1}, + {"matrix": [4, 2], "x": 16, "y": 1}, + {"matrix": [4, 1], "x": 17, "y": 1}, + {"matrix": [4, 0], "x": 18, "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": [2, 4], "x": 4, "y": 2}, + {"matrix": [2, 5], "x": 5, "y": 2}, + + {"matrix": [2, 6], "x": 6, "y": 3.75, "h": 1.25}, + {"matrix": [2, 7], "x": 7, "y": 4}, + {"matrix": [2, 8], "x": 8, "y": 4}, + + {"matrix": [5, 8], "x": 10, "y": 4}, + {"matrix": [5, 7], "x": 11, "y": 4}, + {"matrix": [5, 6], "x": 12, "y": 3.75, "h": 1.25}, + + {"matrix": [5, 5], "x": 13, "y": 2}, + {"matrix": [5, 4], "x": 14, "y": 2}, + {"matrix": [5, 3], "x": 15, "y": 2}, + {"matrix": [5, 2], "x": 16, "y": 2}, + {"matrix": [5, 1], "x": 17, "y": 2}, + {"matrix": [5, 0], "x": 18, "y": 2} ] } } diff --git a/keyboards/orthodox/rev3_teensy/rev3_teensy.c b/keyboards/orthodox/rev3_teensy/rev3_teensy.c index 9faf94fd9a..ecdae6b48d 100644 --- a/keyboards/orthodox/rev3_teensy/rev3_teensy.c +++ b/keyboards/orthodox/rev3_teensy/rev3_teensy.c @@ -19,7 +19,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "rev3_teensy.h" +#include "quantum.h" #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) diff --git a/keyboards/orthodox/rev3_teensy/rev3_teensy.h b/keyboards/orthodox/rev3_teensy/rev3_teensy.h deleted file mode 100644 index 328cb46cc1..0000000000 --- a/keyboards/orthodox/rev3_teensy/rev3_teensy.h +++ /dev/null @@ -1,38 +0,0 @@ -/* -This is the header file for the subproject - -Copyright 2012 Jun Wako -Copyright 2015 Jack Humbert -Copyright 2017 Art Ortenburger - -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 . -*/ - -#pragma once - -#include "quantum.h" - -#define LAYOUT( \ - L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ - L10, L11, L12, L13, L14, L15, L16, L18, R10, R12, R13, R14, R15, R16, R17, R18, \ - L20, L21, L22, L23, L24, L25, L26, L27, L28, R20, R21, R22, R23, R24, R25, R26, R27, R28 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05 }, \ - { L10, L11, L12, L13, L14, L15, L16, KC_NO, L18}, \ - { L20, L21, L22, L23, L24, L25, L26, L27, L28 }, \ - { R05, R04, R03, R02, R01, R00 }, \ - { R18, R17, R16, R15, R14, R13, R12, KC_NO, R10 }, \ - { R28, R27, R26, R25, R24, R23, R22, R21, R20 } \ - } -- cgit v1.2.3