diff options
Diffstat (limited to 'keyboards/hub20')
-rw-r--r-- | keyboards/hub20/config.h | 9 | ||||
-rw-r--r-- | keyboards/hub20/hub20.c | 2 | ||||
-rw-r--r-- | keyboards/hub20/hub20.h | 137 | ||||
-rw-r--r-- | keyboards/hub20/info.json | 153 | ||||
-rw-r--r-- | keyboards/hub20/rules.mk | 1 |
5 files changed, 90 insertions, 212 deletions
diff --git a/keyboards/hub20/config.h b/keyboards/hub20/config.h index 41a98ac983..5fc99ecbf5 100644 --- a/keyboards/hub20/config.h +++ b/keyboards/hub20/config.h @@ -18,19 +18,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#define MATRIX_ROW_PINS { A13, B14, A10, A0, A2, A1 } -#define MATRIX_COL_PINS { A6, A7, B7, B6 } - -/* COL2ROW, ROW2COL*/ -#define DIODE_DIRECTION COL2ROW - -#define RGB_DI_PIN B15 #define RGBLED_NUM 27 #define RGB_MATRIX_LED_COUNT 27 -#ifdef RGB_DI_PIN #define RGBLED_NUM 27 -#endif #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_MATRIX_KEYPRESSES diff --git a/keyboards/hub20/hub20.c b/keyboards/hub20/hub20.c index f7171c5219..8b1c58e1f7 100644 --- a/keyboards/hub20/hub20.c +++ b/keyboards/hub20/hub20.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "hub20.h" +#include "quantum.h" #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/hub20/hub20.h b/keyboards/hub20/hub20.h deleted file mode 100644 index a86cc02c77..0000000000 --- a/keyboards/hub20/hub20.h +++ /dev/null @@ -1,137 +0,0 @@ -/* Copyright 2020 joshajohnson - * - * 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 - -#include "quantum.h" - -#define ___ KC_NO - -/* This is a shortcut to help you visually see your layout. - * - * The first section contains all of the arguments representing the physical - * layout of the board and position of the keys. - * - * The second converts the arguments into a two-dimensional array which - * represents the switch matrix. - */ - - - /* LAYOUT_all - - - * ┌───┬───┐ - * │01 │02 │ - * ┌───┼───┼───┼───┐ - * │10 │11 │12 │13 │ - * ├───┼───┼───┼───┤ - * │20 │21 │22 │23 │ - * ├───┼───┼───┼───┤ - * │30 │31 │32 │33 │ - * ├───┼───┼───┼───┤ - * │40 │41 │42 │43 │ - * ├───┼───┼───┼───┤ - * │50 │51 │52 │53 │ - * └───┴───┴───┴───┘ - */ -#define LAYOUT_all( \ - K01, K02, \ - K10, K11, K12, K13, \ - K20, K21, K22, K23, \ - K30, K31, K32, K33, \ - K40, K41, K42, K43, \ - K50, K51, K52, K53 \ -) \ -{ \ - { ___, K01, K02, ___, }, \ - { K10, K11, K12, K13, }, \ - { K20, K21, K22, K23, }, \ - { K30, K31, K32, K33, }, \ - { K40, K41, K42, K43, }, \ - { K50, K51, K52, K53, }, \ -} - - /* LAYOUT_left_handed - - - * ┌───┬───┐ - * │01 │02 │ - * ┌───┼───┼───┼───┐ - * │10 │11 │12 │13 │ - * ├───┼───┼───┼───┤ - * │ │21 │22 │23 │ - * │20 ├───┼───┼───┤ - * │ │31 │32 │33 │ - * ├───┼───┼───┼───┤ - * │ │41 │42 │43 │ - * │40 ├───┼───┴───┤ - * │ │51 │ 52 │ - * └───┴───┴───────┘ - */ -#define LAYOUT_left_handed( \ - K01, K02, \ - K10, K11, K12, K13, \ - K21, K22, K23, \ - K20, K31, K32, K33, \ - K41, K42, K43, \ - K40, K51, K52 \ -) \ -{ \ - { ___, K01, K02, ___, }, \ - { K10, K11, K12, K13, }, \ - { K20, K21, K22, K23, }, \ - { ___, K31, K32, K33, }, \ - { K40, K41, K42, K43, }, \ - { ___, K51, K52, ___, }, \ -} - - - /* LAYOUT_right_handed - - - * ┌───┬───┐ - * │01 │02 │ - * ┌───┼───┼───┼───┐ - * │10 │11 │12 │13 │ - * ├───┼───┼───┼───┤ - * │20 │21 │22 │ │ - * ├───┼───┼───┤23 │ - * │30 │31 │32 │ │ - * ├───┼───┼───┼───┤ - * │40 │41 │42 │ │ - * ├───┴───┼───┤43 │ - * │ 50(not sure, confirm) │52 │ │ - * └───────┴───┴───┘ - */ - //NOT TESTED, WAITING ENDORSEMENT FROM MANUFACTURER -#define LAYOUT_right_handed( \ - K01, K02, \ - K10, K11, K12, K13, \ - K20, K21, K22, \ - K30, K31, K32, K23, \ - K40, K41, K42, \ - K50, K52, K43 \ -) \ -{ \ - { ___, K01, K02, ___, }, \ - { K10, K11, K12, K13, }, \ - { K20, K21, K22, K23, }, \ - { K30, K31, K32, ___, }, \ - { K40, K41, K42, K43, }, \ - { K50, ___, K52, ___, }, \ -} - - diff --git a/keyboards/hub20/info.json b/keyboards/hub20/info.json index 10ec779fdf..994b9405d9 100644 --- a/keyboards/hub20/info.json +++ b/keyboards/hub20/info.json @@ -8,89 +8,114 @@ "pid": "0x4414", "device_version": "0.0.1" }, + "rgb_matrix": { + "driver": "WS2812" + }, + "matrix_pins": { + "cols": ["A6", "A7", "B7", "B6"], + "rows": ["A13", "B14", "A10", "A0", "A2", "A1"] + }, + "diode_direction": "COL2ROW", "encoder": { "rotary": [ {"pin_a": "B12", "pin_b": "B13"}, {"pin_a": "A8", "pin_b": "A9"} ] }, + "ws2812": { + "pin": "B15" + }, "processor": "STM32F072", "bootloader": "stm32-dfu", "layouts": { "LAYOUT_all": { "layout": [ - {"label":"Mute", "x":0.5, "y":0}, - {"label":"Play / Pause", "x":2.5, "y":0}, - {"label":"-", "x":0, "y":1}, - {"label":"*", "x":1, "y":1}, - {"label":"/", "x":2, "y":1}, - {"label":"Numlock", "x":3, "y":1}, - {"label":"+", "x":0, "y":2}, - {"label":"7", "x":1, "y":2}, - {"label":"8", "x":2, "y":2}, - {"label":"9", "x":3, "y":2}, - {"label":"+", "x":0, "y":3}, - {"label":"4", "x":1, "y":3}, - {"label":"5", "x":2, "y":3}, - {"label":"6", "x":3, "y":3}, - {"label":"Enter", "x":0, "y":4}, - {"label":"1", "x":1, "y":4}, - {"label":"2", "x":2, "y":4}, - {"label":"3", "x":3, "y":4}, - {"label":"Enter", "x":0, "y":5}, - {"label":".", "x":1, "y":5}, - {"label":"0", "x":2, "y":5}, - {"label":"0", "x":3, "y":5} + {"matrix": [0, 1], "x": 0.5, "y": 0}, + + {"matrix": [0, 2], "x": 2.5, "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} ] }, "LAYOUT_left_handed": { "layout": [ - {"label":"Mute", "x":0.5, "y":0}, - {"label":"Play / Pause", "x":2.5, "y":0}, - {"label":"-", "x":0, "y":1}, - {"label":"*", "x":1, "y":1}, - {"label":"/", "x":2, "y":1}, - {"label":"Numlock", "x":3, "y":1}, - {"label":"7", "x":1, "y":2}, - {"label":"8", "x":2, "y":2}, - {"label":"9", "x":3, "y":2}, - {"label":"+", "x":0, "y":2, "h":2}, - {"label":"4", "x":1, "y":3}, - {"label":"5", "x":2, "y":3}, - {"label":"6", "x":3, "y":3}, - {"label":"Enter", "x":0, "y":4, "h":2}, - {"label":"1", "x":1, "y":4}, - {"label":"2", "x":2, "y":4}, - {"label":"3", "x":3, "y":4}, - {"label":".", "x":1, "y":5}, - {"label":"0", "x":3, "y":5, "w":2} + {"matrix": [0, 1], "x": 0.5, "y": 0}, + + {"matrix": [0, 2], "x": 2.5, "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, 1], "x": 1, "y": 2}, + {"matrix": [2, 2], "x": 2, "y": 2}, + {"matrix": [2, 3], "x": 3, "y": 2}, + + {"matrix": [2, 0], "x": 0, "y": 2, "h": 2}, + {"matrix": [3, 1], "x": 1, "y": 3}, + {"matrix": [3, 2], "x": 2, "y": 3}, + {"matrix": [3, 3], "x": 3, "y": 3}, + + {"matrix": [4, 1], "x": 0, "y": 4, "h": 2}, + {"matrix": [4, 2], "x": 1, "y": 4}, + {"matrix": [4, 3], "x": 2, "y": 4}, + {"matrix": [4, 0], "x": 3, "y": 4}, + + {"matrix": [5, 1], "x": 1, "y": 5}, + {"matrix": [5, 2], "x": 2, "y": 5, "w": 2} ] }, "LAYOUT_right_handed": { "layout": [ - {"label":"Mute", "x":0.5, "y":0}, - {"label":"Play / Pause", "x":2.5, "y":0}, - {"label":"Numlock", "x":0, "y":1}, - {"label":"/", "x":1, "y":1}, - {"label":"*", "x":2, "y":1}, - {"label":"-", "x":3, "y":1}, - - {"label":"7", "x":0, "y":2}, - {"label":"8", "x":1, "y":2}, - {"label":"9", "x":2, "y":2}, - - {"label":"4", "x":0, "y":3}, - {"label":"5", "x":1, "y":3}, - {"label":"6", "x":2, "y":3}, - {"label":"+", "x":3, "y":2, "h":2}, - - {"label":"1", "x":0, "y":4}, - {"label":"2", "x":1, "y":4}, - {"label":"3", "x":2, "y":4}, - - {"label":"0", "x":0, "y":5, "w":2}, - {"label":".", "x":2, "y":5}, - {"label":"Enter", "x":3, "y":4, "h":2} + {"matrix": [0, 1], "x": 0.5, "y": 0}, + + {"matrix": [0, 2], "x": 2.5, "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": [3, 0], "x": 0, "y": 3}, + {"matrix": [3, 1], "x": 1, "y": 3}, + {"matrix": [3, 2], "x": 2, "y": 3}, + {"matrix": [2, 3], "x": 3, "y": 2, "h": 2}, + + {"matrix": [4, 0], "x": 0, "y": 4}, + {"matrix": [4, 1], "x": 1, "y": 4}, + {"matrix": [4, 2], "x": 2, "y": 4}, + + {"matrix": [5, 0], "x": 0, "y": 5, "w": 2}, + {"matrix": [5, 2], "x": 2, "y": 5}, + {"matrix": [4, 3], "x": 3, "y": 4, "h": 2} ] } } diff --git a/keyboards/hub20/rules.mk b/keyboards/hub20/rules.mk index 2dd9c5acc6..081ea9225a 100644 --- a/keyboards/hub20/rules.mk +++ b/keyboards/hub20/rules.mk @@ -11,7 +11,6 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output RGB_MATRIX_ENABLE = yes -RGB_MATRIX_DRIVER = WS2812 ENCODER_ENABLE = yes # Enter lower-power sleep mode when on the ChibiOS idle thread |