diff options
Diffstat (limited to 'keyboards/jones/v1')
-rw-r--r-- | keyboards/jones/v1/config.h | 10 | ||||
-rw-r--r-- | keyboards/jones/v1/info.json | 95 | ||||
-rw-r--r-- | keyboards/jones/v1/keymaps/via/keymap.c | 8 | ||||
-rw-r--r-- | keyboards/jones/v1/v1.c | 2 | ||||
-rw-r--r-- | keyboards/jones/v1/v1.h | 57 |
5 files changed, 94 insertions, 78 deletions
diff --git a/keyboards/jones/v1/config.h b/keyboards/jones/v1/config.h index 1936d5d256..92801acea7 100644 --- a/keyboards/jones/v1/config.h +++ b/keyboards/jones/v1/config.h @@ -17,13 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once - -// Same pins for Round-Robin matrix. -#define MATRIX_ROW_PINS { B3, B2, E6, D6, D4, B0, B1, B7, B4, D7 } -#define MATRIX_COL_PINS { B3, B2, E6, D6, D4, B0, B1, B7, B4, D7 } - -#define DIODE_DIRECTION COL2ROW - /* Audio */ #ifdef AUDIO_ENABLE #define AUDIO_PIN C6 @@ -32,8 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #endif /* RGBLIGHT */ -#define RGB_DI_PIN F1 -#ifdef RGB_DI_PIN #define RGBLED_NUM 4 // Left(2) + Right(2) #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 @@ -42,7 +33,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /*== Lighting Layers ==*/ #define RGBLIGHT_LAYERS #define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF // Overriding RGB Lighting on/off status -#endif /* External EEPROM */ // Use 24LC64 EEPROM diff --git a/keyboards/jones/v1/info.json b/keyboards/jones/v1/info.json index 37f0b70087..cd0286ef6b 100644 --- a/keyboards/jones/v1/info.json +++ b/keyboards/jones/v1/info.json @@ -8,6 +8,14 @@ "pid": "0x175A", "device_version": "1.0.0" }, + "matrix_pins": { + "cols": ["B3", "B2", "E6", "D6", "D4", "B0", "B1", "B7", "B4", "D7"], + "rows": ["B3", "B2", "E6", "D6", "D4", "B0", "B1", "B7", "B4", "D7"] + }, + "ws2812": { + "pin": "F1" + }, + "diode_direction": "COL2ROW", "encoder": { "rotary": [ {"pin_a": "F5", "pin_b": "F4"}, @@ -22,12 +30,87 @@ "layouts": { "LAYOUT": { "layout": [ - {"x":0.5, "y":0}, {"x":1.5, "y":0}, {"x":2.5, "y":0}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":5.5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":10.5, "y":0}, {"x":11.5, "y":0}, {"x":12.5, "y":0}, {"x":13.5, "y":0}, {"x":14.5, "y":0}, - {"x":0.5, "y":1, "w":1.5}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1, "w":1.5}, - {"x":0.5, "y":2, "w":1.5}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":12, "y":2}, {"x":13, "y":2}, {"x":14, "y":2, "w":1.5}, - {"x":0.5, "y":3}, {"x":1.5, "y":3}, {"x":2.5, "y":3}, {"x":3.5, "y":3}, {"x":4.5, "y":3}, {"x":5.5, "y":3}, {"x":6.5, "y":3}, {"x":7.5, "y":3}, {"x":8.5, "y":3}, {"x":9.5, "y":3}, {"x":10.5, "y":3}, {"x":11.5, "y":3}, {"x":12.5, "y":3}, {"x":13.5, "y":3}, {"x":14.5, "y":3}, - {"x":0.5, "y":4}, {"x":1.5, "y":4}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":1.25}, {"x":5, "y":4, "w":1.5}, {"x":6.5, "y":4}, {"x":7.5, "y":4}, {"x":8.5, "y":4}, {"x":9.5, "y":4, "w":1.5}, {"x":11, "y":4, "w":1.25}, {"x":12.25, "y":4, "w":1.25}, {"x":13.5, "y":4}, {"x":14.5, "y":4}, - {"x":0, "y":5}, {"x":1, "y":5}, {"x":14, "y":5}, {"x":15, "y":5} + {"label": "k09", "matrix": [0, 9], "x": 0.5, "y": 0}, + {"label": "k59", "matrix": [5, 9], "x": 1.5, "y": 0}, + {"label": "k08", "matrix": [0, 8], "x": 2.5, "y": 0}, + {"label": "k54", "matrix": [5, 4], "x": 3.5, "y": 0}, + {"label": "k04", "matrix": [0, 4], "x": 4.5, "y": 0}, + {"label": "k50", "matrix": [5, 0], "x": 5.5, "y": 0}, + {"label": "k56", "matrix": [5, 6], "x": 6.5, "y": 0}, + {"label": "k06", "matrix": [0, 6], "x": 7.5, "y": 0}, + {"label": "k05", "matrix": [0, 5], "x": 8.5, "y": 0}, + {"label": "k52", "matrix": [5, 2], "x": 9.5, "y": 0}, + {"label": "k02", "matrix": [0, 2], "x": 10.5, "y": 0}, + {"label": "k53", "matrix": [5, 3], "x": 11.5, "y": 0}, + {"label": "k07", "matrix": [0, 7], "x": 12.5, "y": 0}, + {"label": "k51", "matrix": [5, 1], "x": 13.5, "y": 0}, + {"label": "k01", "matrix": [0, 1], "x": 14.5, "y": 0}, + + {"label": "k19", "matrix": [1, 9], "x": 0.5, "y": 1, "w": 1.5}, + {"label": "k69", "matrix": [6, 9], "x": 2, "y": 1}, + {"label": "k18", "matrix": [1, 8], "x": 3, "y": 1}, + {"label": "k64", "matrix": [6, 4], "x": 4, "y": 1}, + {"label": "k14", "matrix": [1, 4], "x": 5, "y": 1}, + {"label": "k60", "matrix": [6, 0], "x": 6, "y": 1}, + {"label": "k10", "matrix": [1, 0], "x": 7, "y": 1}, + {"label": "k16", "matrix": [1, 6], "x": 8, "y": 1}, + {"label": "k15", "matrix": [1, 5], "x": 9, "y": 1}, + {"label": "k62", "matrix": [6, 2], "x": 10, "y": 1}, + {"label": "k12", "matrix": [1, 2], "x": 11, "y": 1}, + {"label": "k63", "matrix": [6, 3], "x": 12, "y": 1}, + {"label": "k17", "matrix": [1, 7], "x": 13, "y": 1}, + {"label": "k61", "matrix": [6, 1], "x": 14, "y": 1, "w": 1.5}, + + {"label": "k29", "matrix": [2, 9], "x": 0.5, "y": 2, "w": 1.5}, + {"label": "k79", "matrix": [7, 9], "x": 2, "y": 2}, + {"label": "k28", "matrix": [2, 8], "x": 3, "y": 2}, + {"label": "k74", "matrix": [7, 4], "x": 4, "y": 2}, + {"label": "k24", "matrix": [2, 4], "x": 5, "y": 2}, + {"label": "k70", "matrix": [7, 0], "x": 6, "y": 2}, + {"label": "k20", "matrix": [2, 0], "x": 7, "y": 2}, + {"label": "k26", "matrix": [2, 6], "x": 8, "y": 2}, + {"label": "k25", "matrix": [2, 5], "x": 9, "y": 2}, + {"label": "k72", "matrix": [7, 2], "x": 10, "y": 2}, + {"label": "k23", "matrix": [2, 3], "x": 11, "y": 2}, + {"label": "k73", "matrix": [7, 3], "x": 12, "y": 2}, + {"label": "k27", "matrix": [2, 7], "x": 13, "y": 2}, + {"label": "k71", "matrix": [7, 1], "x": 14, "y": 2, "w": 1.5}, + + {"label": "k39", "matrix": [3, 9], "x": 0.5, "y": 3}, + {"label": "k89", "matrix": [8, 9], "x": 1.5, "y": 3}, + {"label": "k38", "matrix": [3, 8], "x": 2.5, "y": 3}, + {"label": "k84", "matrix": [8, 4], "x": 3.5, "y": 3}, + {"label": "k34", "matrix": [3, 4], "x": 4.5, "y": 3}, + {"label": "k80", "matrix": [8, 0], "x": 5.5, "y": 3}, + {"label": "k30", "matrix": [3, 0], "x": 6.5, "y": 3}, + {"label": "k36", "matrix": [3, 6], "x": 7.5, "y": 3}, + {"label": "k35", "matrix": [3, 5], "x": 8.5, "y": 3}, + {"label": "k82", "matrix": [8, 2], "x": 9.5, "y": 3}, + {"label": "k32", "matrix": [3, 2], "x": 10.5, "y": 3}, + {"label": "k83", "matrix": [8, 3], "x": 11.5, "y": 3}, + {"label": "k37", "matrix": [3, 7], "x": 12.5, "y": 3}, + {"label": "k81", "matrix": [8, 1], "x": 13.5, "y": 3}, + {"label": "k31", "matrix": [3, 1], "x": 14.5, "y": 3}, + + {"label": "k49", "matrix": [4, 9], "x": 0.5, "y": 4}, + {"label": "k98", "matrix": [9, 8], "x": 1.5, "y": 4}, + {"label": "k48", "matrix": [4, 8], "x": 2.5, "y": 4, "w": 1.25}, + {"label": "k94", "matrix": [9, 4], "x": 3.75, "y": 4, "w": 1.25}, + {"label": "k90", "matrix": [9, 0], "x": 5, "y": 4, "w": 1.5}, + {"label": "k46", "matrix": [4, 6], "x": 6.5, "y": 4}, + {"label": "k45", "matrix": [4, 5], "x": 7.5, "y": 4}, + {"label": "k92", "matrix": [9, 2], "x": 8.5, "y": 4}, + {"label": "k42", "matrix": [4, 2], "x": 9.5, "y": 4, "w": 1.5}, + {"label": "k93", "matrix": [9, 3], "x": 11, "y": 4, "w": 1.25}, + {"label": "k47", "matrix": [4, 7], "x": 12.25, "y": 4, "w": 1.25}, + {"label": "k91", "matrix": [9, 1], "x": 13.5, "y": 4}, + {"label": "k41", "matrix": [4, 1], "x": 14.5, "y": 4}, + + {"label": "k85", "matrix": [8, 5], "x": 0, "y": 5}, + {"label": "k86", "matrix": [8, 6], "x": 1, "y": 5}, + + {"label": "k95", "matrix": [9, 5], "x": 14, "y": 5}, + {"label": "k96", "matrix": [9, 6], "x": 15, "y": 5} ] } } diff --git a/keyboards/jones/v1/keymaps/via/keymap.c b/keyboards/jones/v1/keymaps/via/keymap.c index 31a182733a..3b41c40174 100644 --- a/keyboards/jones/v1/keymaps/via/keymap.c +++ b/keyboards/jones/v1/keymaps/via/keymap.c @@ -178,7 +178,8 @@ void encoder_action_unregister(void) { keyevent_t encoder_event = (keyevent_t) { .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], .pressed = false, - .time = (timer_read() | 1) + .time = timer_read(), + .type = KEY_EVENT }; encoder_state[index] = 0; action_exec(encoder_event); @@ -190,7 +191,8 @@ void encoder_action_register(uint8_t index, bool clockwise) { keyevent_t encoder_event = (keyevent_t) { .key = clockwise ? encoder_cw[index] : encoder_ccw[index], .pressed = true, - .time = (timer_read() | 1) + .time = timer_read(), + .type = KEY_EVENT }; encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); action_exec(encoder_event); @@ -212,7 +214,6 @@ bool encoder_update_user(uint8_t index, bool clockwise) { //------------------------------------------------------------------------------ void keyboard_post_init_user(void) { debug_enable=true; -#ifdef RGB_DI_PIN #ifdef RGBLIGHT_LAYERS // Enable the LED layers. rgblight_layers = my_rgb_layers; @@ -220,6 +221,5 @@ debug_enable=true; // prevent RGB light overrides layer indicator. layer_state_set(default_layer_state); #endif -#endif } diff --git a/keyboards/jones/v1/v1.c b/keyboards/jones/v1/v1.c index 292a1fbabe..bb13049a67 100644 --- a/keyboards/jones/v1/v1.c +++ b/keyboards/jones/v1/v1.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "v1.h" +#include QMK_KEYBOARD_H #if defined(AUDIO_ENABLE) && defined(MUSIC_MAP) const uint8_t music_map[MATRIX_ROWS][MATRIX_COLS] = LAYOUT( diff --git a/keyboards/jones/v1/v1.h b/keyboards/jones/v1/v1.h deleted file mode 100644 index e37c34accc..0000000000 --- a/keyboards/jones/v1/v1.h +++ /dev/null @@ -1,57 +0,0 @@ -/* Copyright 2021 Takeshi Nishio - * - * 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" - -/* -FULL 10x10 ROUND-ROBIN MATRIX for Reference - -{ KC_NO, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \ -{ k10, KC_NO, k12, k13, k14, k15, k16, k17, k18, k19 }, \ -{ k20, k21, KC_NO, k23, k24, k25, k26, k27, k28, k29 }, \ -{ k30, k31, k32, KC_NO, k34, k35, k36, k37, k38, k39 }, \ -{ k40, k41, k42, k43, KC_NO, k45, k46, k47, k48, k49 }, \ -{ k50, k51, k52, k53, k54, KC_NO, k56, k57, k58, k59 }, \ -{ k60, k61, k62, k63, k64, k65, KC_NO, k67, k68, k69 }, \ -{ k70, k71, k72, k73, k74, k75, k76, KC_NO, k78, k79 }, \ -{ k80, k81, k82, k83, k84, k85, k86, k87, KC_NO, k89 }, \ -{ k90, k91, k92, k93, k94, k95, k96, k97, k98, KC_NO } \ - -*/ - -/* Keys on 6th row are used with rotary encoder. */ -#define LAYOUT( \ - k09, k59, k08, k54, k04, k50, k56, k06, k05, k52, k02, k53, k07, k51, k01, \ - k19, k69, k18, k64, k14, k60, k10, k16, k15, k62, k12, k63, k17, k61, \ - k29, k79, k28, k74, k24, k70, k20, k26, k25, k72, k23, k73, k27, k71, \ - k39, k89, k38, k84, k34, k80, k30, k36, k35, k82, k32, k83, k37, k81, k31, \ - k49, k98, k48, k94, k90, k46, k45, k92, k42, k93, k47, k91, k41, \ - k85, k86, k95, k96 \ -) \ -{ \ - { KC_NO, k01, k02, KC_NO, k04, k05, k06, k07, k08, k09, }, \ - { k10, KC_NO, k12, KC_NO, k14, k15, k16, k17, k18, k19, }, \ - { k20, KC_NO, KC_NO, k23, k24, k25, k26, k27, k28, k29, }, \ - { k30, k31, k32, KC_NO, k34, k35, k36, k37, k38, k39, }, \ - { KC_NO, k41, k42, KC_NO, KC_NO, k45, k46, k47, k48, k49, }, \ - { k50, k51, k52, k53, k54, KC_NO, k56, KC_NO, KC_NO, k59, }, \ - { k60, k61, k62, k63, k64, KC_NO, KC_NO, KC_NO, KC_NO, k69, }, \ - { k70, k71, k72, k73, k74, KC_NO, KC_NO, KC_NO, KC_NO, k79, }, \ - { k80, k81, k82, k83, k84, k85, k86, KC_NO, KC_NO, k89, }, \ - { k90, k91, k92, k93, k94, k95, k96, KC_NO, k98, KC_NO } \ -} |