From 4869b8061c187f6476f8f14b839dd2c2c9f74dd2 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 29 Mar 2023 15:54:34 +1100 Subject: Move ortho & numpad layouts to data driven (#20183) Co-authored-by: Nick Brassel --- keyboards/sixkeyboard/info.json | 10 +++++++++- keyboards/sixkeyboard/matrix.c | 2 +- keyboards/sixkeyboard/sixkeyboard.c | 2 +- keyboards/sixkeyboard/sixkeyboard.h | 18 ------------------ 4 files changed, 11 insertions(+), 21 deletions(-) delete mode 100644 keyboards/sixkeyboard/sixkeyboard.h (limited to 'keyboards/sixkeyboard') diff --git a/keyboards/sixkeyboard/info.json b/keyboards/sixkeyboard/info.json index 26c3a2894a..2aefe3e8b9 100644 --- a/keyboards/sixkeyboard/info.json +++ b/keyboards/sixkeyboard/info.json @@ -13,7 +13,15 @@ "community_layouts": ["ortho_2x3"], "layouts": { "LAYOUT_ortho_2x3": { - "layout": [{"label":"k00", "x":0, "y":0}, {"label":"k01", "x":1, "y":0}, {"label":"k02", "x":2, "y":0}, {"label":"k10", "x":0, "y":1}, {"label":"k11", "x":1, "y":1}, {"label":"k12", "x":2, "y":1}] + "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} + ] } } } diff --git a/keyboards/sixkeyboard/matrix.c b/keyboards/sixkeyboard/matrix.c index 17d51a8885..ddbd41ac55 100644 --- a/keyboards/sixkeyboard/matrix.c +++ b/keyboards/sixkeyboard/matrix.c @@ -28,7 +28,7 @@ along with this program. If not, see . #include "debug.h" #include "util.h" #include "matrix.h" -#include "sixkeyboard.h" +#include "timer.h" #include /* matrix state(1:on, 0:off) */ diff --git a/keyboards/sixkeyboard/sixkeyboard.c b/keyboards/sixkeyboard/sixkeyboard.c index 85190f6167..7667ee7f44 100644 --- a/keyboards/sixkeyboard/sixkeyboard.c +++ b/keyboards/sixkeyboard/sixkeyboard.c @@ -1,4 +1,4 @@ -#include "sixkeyboard.h" +#include "quantum.h" void matrix_init_kb(void) { // put your keyboard start-up code here diff --git a/keyboards/sixkeyboard/sixkeyboard.h b/keyboards/sixkeyboard/sixkeyboard.h deleted file mode 100644 index 3f563af6d1..0000000000 --- a/keyboards/sixkeyboard/sixkeyboard.h +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once - -#include "quantum.h" - -/* - * ┌───┬───┬───┐ - * │ A │ B │ C │ - * ├───┼───┼───┤ - * │ D │ E │ F │ - * └───┴───┴───┘ - */ -#define LAYOUT_ortho_2x3( \ - k00, k01, k02, \ - k10, k11, k12 \ -) { \ - { k00, k01, k02 }, \ - { k10, k11, k12 } \ -} -- cgit v1.2.3