diff options
Diffstat (limited to 'keyboards/keychron')
151 files changed, 398 insertions, 1268 deletions
diff --git a/keyboards/keychron/common/keychron_common.c b/keyboards/keychron/common/keychron_common.c index a6250966f3..9c7fc3ace5 100644 --- a/keyboards/keychron/common/keychron_common.c +++ b/keyboards/keychron/common/keychron_common.c @@ -14,8 +14,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include QMK_KEYBOARD_H #include "keychron_common.h" +#include "sync_timer.h" bool is_siri_active = false; uint32_t siri_timer = 0; diff --git a/keyboards/keychron/common/keychron_common.h b/keyboards/keychron/common/keychron_common.h index 5e56a828c8..648a5d3371 100644 --- a/keyboards/keychron/common/keychron_common.h +++ b/keyboards/keychron/common/keychron_common.h @@ -16,10 +16,14 @@ #pragma once -#include "stdint.h" +#include <stdint.h> +#include <stdbool.h> +#include "action.h" + #ifdef VIA_ENABLE # include "via.h" #endif + #include "quantum_keycodes.h" enum custom_keycodes { diff --git a/keyboards/keychron/q0/config.h b/keyboards/keychron/q0/config.h index 28e942da07..c0366b1ed8 100644 --- a/keyboards/keychron/q0/config.h +++ b/keyboards/keychron/q0/config.h @@ -16,14 +16,8 @@ #pragma once -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION ROW2COL - #define CKLED2001_CURRENT_TUNE { 0xFF, 0xFF, 0x70, 0xFF, 0xFF, 0x70, 0xFF, 0xFF, 0x70, 0xFF, 0xFF, 0x70 } -/* NKRO */ -#define FORCE_NKRO - /* turn off effects when suspended */ #define RGB_DISABLE_WHEN_USB_SUSPENDED @@ -31,54 +25,5 @@ #define WEAR_LEVELING_LOGICAL_SIZE 2048 #define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2) -// RGB Matrix Animation modes. Explicitly enabled -// For full list of effects, see: -// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects -// #define ENABLE_RGB_MATRIX_ALPHAS_MODS -// #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN -// #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT -#define ENABLE_RGB_MATRIX_BREATHING -// #define ENABLE_RGB_MATRIX_BAND_SAT -// #define ENABLE_RGB_MATRIX_BAND_VAL -// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT -#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL -#define ENABLE_RGB_MATRIX_CYCLE_ALL -#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN -#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN -#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL -#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL -#define ENABLE_RGB_MATRIX_DUAL_BEACON -#define ENABLE_RGB_MATRIX_RAINBOW_BEACON -// #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS -// #define ENABLE_RGB_MATRIX_RAINDROPS -#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -// #define ENABLE_RGB_MATRIX_HUE_BREATHING -// #define ENABLE_RGB_MATRIX_HUE_PENDULUM -// #define ENABLE_RGB_MATRIX_HUE_WAVE -#define ENABLE_RGB_MATRIX_PIXEL_RAIN -// #define ENABLE_RGB_MATRIX_PIXEL_FLOW -// #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL -// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined -#define ENABLE_RGB_MATRIX_TYPING_HEATMAP -#define ENABLE_RGB_MATRIX_DIGITAL_RAIN -// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined -#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE -// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -#define ENABLE_RGB_MATRIX_SPLASH -// #define ENABLE_RGB_MATRIX_MULTISPLASH -#define ENABLE_RGB_MATRIX_SOLID_SPLASH -// #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH - #define RGB_MATRIX_KEYPRESSES -#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
\ No newline at end of file diff --git a/keyboards/keychron/q0/rev_0130/config.h b/keyboards/keychron/q0/rev_0130/config.h index 80a2e150af..12ecfe1356 100644 --- a/keyboards/keychron/q0/rev_0130/config.h +++ b/keyboards/keychron/q0/rev_0130/config.h @@ -16,10 +16,6 @@ #pragma once -/* key matrix pins */ -#define MATRIX_ROW_PINS { B5, B4, B3, A15, A14, A13 } -#define MATRIX_COL_PINS { A5, A6, A7, B0 } - /* RGB Matrix Driver Configuration */ #define DRIVER_COUNT 1 #define DRIVER_ADDR_1 0b1110100 @@ -28,7 +24,5 @@ #define DRIVER_1_LED_TOTAL 21 #define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL -#define RGB_MATRIX_CENTER { 56, 16 } - /* Enable num-lock LED */ #define NUM_LOCK_LED_INDEX 4 diff --git a/keyboards/keychron/q0/rev_0130/info.json b/keyboards/keychron/q0/rev_0130/info.json index 334f879d3b..688c9da92e 100644 --- a/keyboards/keychron/q0/rev_0130/info.json +++ b/keyboards/keychron/q0/rev_0130/info.json @@ -6,10 +6,84 @@ "usb": { "vid": "0x3434", "pid": "0x0130", - "device_version": "1.0.2" + "device_version": "1.0.2", + "force_nkro": true }, + "matrix_pins": { + "cols": ["A5", "A6", "A7", "B0"], + "rows": ["B5", "B4", "B3", "A15", "A14", "A13"] + }, + "features": { + "audio": false, + "backlight": false, + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgb_matrix": true, + "rgblight": false + }, + "diode_direction": "ROW2COL", "processor": "STM32L432", "bootloader": "stm32-dfu", + "rgb_matrix": { + "driver": "CKLED2001", + "animations": { + "band_spiral_val": true, + "breathing": true, + "cycle_all": true, + "cycle_left_right": true, + "cycle_up_down": true, + "rainbow_moving_chevron": true, + "cycle_out_in": true, + "cycle_out_in_dual": true, + "cycle_pinwheel": true, + "cycle_spiral": true, + "dual_beacon": true, + "rainbow_beacon": true, + "jellybean_raindrops": true, + "pixel_rain": true, + "typing_heatmap": true, + "digital_rain": true, + "solid_reactive_simple": true, + "solid_reactive_multiwide": true, + "solid_reactive_multinexus": true, + "splash": true, + "solid_splash": true + }, + "center_point": [56, 16], + "layout": [ + {"flags": 1,"matrix":[0,0], "x":0, "y":0}, + {"flags": 1,"matrix":[0,1], "x":37, "y":0}, + {"flags": 1,"matrix":[0,2], "x":75, "y":0}, + {"flags": 1,"matrix":[0,3], "x":112, "y":0}, + + + {"flags": 9,"matrix":[1,0], "x":0, "y":6}, + {"flags": 4,"matrix":[1,1], "x":37, "y":6}, + {"flags": 4,"matrix":[1,2], "x":75, "y":6}, + {"flags": 4,"matrix":[1,3], "x":112, "y":6}, + + {"flags": 4,"matrix":[2,0], "x":0, "y":13}, + {"flags": 4,"matrix":[2,1], "x":37, "y":13}, + {"flags": 4,"matrix":[2,2], "x":75, "y":13}, + + {"flags": 4,"matrix":[3,0], "x":0, "y":19}, + {"flags": 4,"matrix":[3,1], "x":37, "y":19}, + {"flags": 4,"matrix":[3,2], "x":75, "y":19}, + {"flags": 4,"matrix":[2,3], "x":112, "y":16}, + + {"flags": 4,"matrix":[4,0], "x":0, "y":25}, + {"flags": 4,"matrix":[4,1], "x":37, "y":25}, + {"flags": 4,"matrix":[4,2], "x":75, "y":25}, + + {"flags": 4,"matrix":[5,0], "x":18, "y":32}, + {"flags": 4,"matrix":[5,2], "x":75, "y":32}, + {"flags": 1,"matrix":[4,3], "x":112, "y":29} + ] + }, "layouts": { "LAYOUT_numpad_6x4": { "layout": [ diff --git a/keyboards/keychron/q0/rev_0130/keymaps/keychron/rules.mk b/keyboards/keychron/q0/rev_0130/keymaps/keychron/rules.mk index 9cf1a9b56c..495e8907b4 100644 --- a/keyboards/keychron/q0/rev_0130/keymaps/keychron/rules.mk +++ b/keyboards/keychron/q0/rev_0130/keymaps/keychron/rules.mk @@ -1,5 +1,4 @@ VIA_ENABLE = yes -ENCODER_MAP_ENABLE = yes VPATH += keyboards/keychron/common SRC += keychron_common.c diff --git a/keyboards/keychron/q0/rev_0130/rev_0130.c b/keyboards/keychron/q0/rev_0130/rev_0130.c index b968361c7e..ffe82a6d8c 100644 --- a/keyboards/keychron/q0/rev_0130/rev_0130.c +++ b/keyboards/keychron/q0/rev_0130/rev_0130.c @@ -54,37 +54,4 @@ const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { {0, L_1, J_1, K_1}, // 19 {0, C_2, A_2, B_2}, // 20 }; - -#define __ NO_LED - -led_config_t g_led_config = { - { - // Key Matrix to LED Index - { 0, 1, 2, 3 }, - { 4, 5, 6, 7 }, - { 8, 9, 10, 14 }, - { 11, 12, 13, __ }, - { 15, 16, 17, 20 }, - { 18, __, 19, __ } - }, - { - // LED Index to Physical Position - {0,0}, {37,0}, {75,0}, {112,0}, - {0,6}, {37,6}, {75,6}, {112,6}, - {0,13}, {37,13}, {75,13}, - {0,19}, {37,19}, {75,19}, {112,16}, - {0,25}, {37,25}, {75,25}, - {18,32}, {75,32}, {112,29}, - }, - { - // LED Index to Flag - 1, 1, 1, 1, - 9, 4, 4, 4, - 4, 4, 4, - 4, 4, 4, 4, - 4, 4, 4, - 4, 4, 1 - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/q0/rev_0130/rules.mk b/keyboards/keychron/q0/rev_0130/rules.mk index 3a31dbc81a..4eebc33437 100644 --- a/keyboards/keychron/q0/rev_0130/rules.mk +++ b/keyboards/keychron/q0/rev_0130/rules.mk @@ -1,19 +1,3 @@ -# Build Options -# change yes to no to disable. -# -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # Enable USB N-key Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output -DIP_SWITCH_ENABLE = no -RGB_MATRIX_ENABLE = yes -RGB_MATRIX_DRIVER = CKLED2001 -LTO_ENABLE = yes EEPROM_DRIVER = wear_leveling WEAR_LEVELING_DRIVER = embedded_flash diff --git a/keyboards/keychron/q0/rev_0131/config.h b/keyboards/keychron/q0/rev_0131/config.h index f94517ebb4..e4c5c2d3fc 100644 --- a/keyboards/keychron/q0/rev_0131/config.h +++ b/keyboards/keychron/q0/rev_0131/config.h @@ -16,10 +16,6 @@ #pragma once -/* key matrix pins */ -#define MATRIX_ROW_PINS { B5, B4, B3, A15, A14, A13 } -#define MATRIX_COL_PINS { C14, C15, A0, A1, A2 } - /* RGB Matrix Driver Configuration */ #define DRIVER_COUNT 1 #define DRIVER_ADDR_1 0b1110111 diff --git a/keyboards/keychron/q0/rev_0131/info.json b/keyboards/keychron/q0/rev_0131/info.json index 94808bd9c4..d25a2e6d9d 100644 --- a/keyboards/keychron/q0/rev_0131/info.json +++ b/keyboards/keychron/q0/rev_0131/info.json @@ -6,8 +6,27 @@ "usb": { "vid": "0x3434", "pid": "0x0131", - "device_version": "1.0.0" + "device_version": "1.0.0", + "force_nkro": true }, + "matrix_pins": { + "cols": ["C14", "C15", "A0", "A1", "A2"], + "rows": ["B5", "B4", "B3", "A15", "A14", "A13"] + }, + "features": { + "audio": false, + "backlight": false, + "bootmagic": true, + "command": false, + "console": false, + "encoder": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgb_matrix": true, + "rgblight": false + }, + "diode_direction": "ROW2COL", "encoder": { "rotary": [ {"pin_a": "A3", "pin_b": "A4"} @@ -18,6 +37,65 @@ }, "processor": "STM32L432", "bootloader": "stm32-dfu", + "rgb_matrix": { + "driver": "CKLED2001", + "animations": { + "band_spiral_val": true, + "breathing": true, + "cycle_all": true, + "cycle_left_right": true, + "cycle_up_down": true, + "rainbow_moving_chevron": true, + "cycle_out_in": true, + "cycle_out_in_dual": true, + "cycle_pinwheel": true, + "cycle_spiral": true, + "dual_beacon": true, + "rainbow_beacon": true, + "jellybean_raindrops": true, + "pixel_rain": true, + "typing_heatmap": true, + "digital_rain": true, + "solid_reactive_simple": true, + "solid_reactive_multiwide": true, + "solid_reactive_multinexus": true, + "splash": true, + "solid_splash": true + }, + "layout": [ + {"flags": 1, "matrix":[0,1], "x":56, "y":0}, + {"flags": 1, "matrix":[0,2], "x":112, "y":0}, + {"flags": 1, "matrix":[0,3], "x":168, "y":0}, + {"flags": 1, "matrix":[0,4], "x":224, "y":0}, + + {"flags": 4, "matrix":[1,0], "x":0, "y":15}, + {"flags": 8, "matrix":[1,1], "x":56, "y":15}, + {"flags": 4, "matrix":[1,2], "x":112, "y":15}, + {"flags": 4, "matrix":[1,3], "x":168, "y":15}, + {"flags": 4, "matrix":[1,4], "x":224, "y":15}, + + {"flags": 4, "matrix":[2,0], "x":0, "y":27}, + {"flags": 4, "matrix":[2,1], "x":56, "y":27}, + {"flags": 4, "matrix":[2,2], "x":112, "y":27}, + {"flags": 4, "matrix":[2,3], "x":168, "y":27}, + {"flags": 4, "matrix":[2,4], "x":224, "y":34}, + + {"flags": 4, "matrix":[3,0], "x":0, "y":40}, + {"flags": 4, "matrix":[3,1], "x":56, "y":40}, + {"flags": 4, "matrix":[3,2], "x":112, "y":40}, + {"flags": 4, "matrix":[3,3], "x":168, "y":40}, + + {"flags": 4, "matrix":[4,0], "x":0, "y":52}, + {"flags": 4, "matrix":[4,1], "x":56, "y":52}, + {"flags": 4, "matrix":[4,2], "x":112, "y":52}, + {"flags": 4, "matrix":[4,3], "x":168, "y":52}, + {"flags": 4, "matrix":[4,4], "x":224, "y":58}, + + {"flags": 4, "matrix":[5,0], "x":0, "y":64}, + {"flags": 4, "matrix":[5,1], "x":84, "y":64}, + {"flags": 1, "matrix":[5,3], "x":168, "y":64} + ] + }, "layouts": { "LAYOUT_numpad_6x5": { "layout": [ diff --git a/keyboards/keychron/q0/rev_0131/rev_0131.c b/keyboards/keychron/q0/rev_0131/rev_0131.c index c67a460557..282c511ce2 100644 --- a/keyboards/keychron/q0/rev_0131/rev_0131.c +++ b/keyboards/keychron/q0/rev_0131/rev_0131.c @@ -59,37 +59,4 @@ const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { {0, F_7, D_7, E_7}, {0, F_9, D_9, E_9}, }; - -#define __ NO_LED - -led_config_t g_led_config = { - { - // Key Matrix to LED Index - { __, 0, 1, 2, 3 }, - { 4, 5, 6, 7, 8 }, - { 9, 10, 11, 12, 13 }, - { 14, 15, 16, 17, __ }, - { 18, 19, 20, 21, 22 }, - { 23, 24, __, 25, __ }, - }, - { - // LED Index to Physical Position - {56,0}, {112,0}, {168,0}, {224,0}, - {0,15}, {56,15}, {112,15}, {168,15}, {224,15}, - {0,27}, {56,27}, {112,27}, {168,27}, {224,34}, - {0,40}, {56,40}, {112,40}, {168,40}, - {0,52}, {56,52}, {112,52}, {168,52}, {224,58}, - {0,64}, {84,64}, {168,64}, - }, - { - // LED Index to Flag - 1, 1, 1, 1, - 4, 8, 4, 4, 4, - 4, 4, 4, 4, 4, - 4, 4, 4, 4, - 4, 4, 4, 4, 4, - 4, 4, 1, - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/q0/rev_0131/rules.mk b/keyboards/keychron/q0/rev_0131/rules.mk index d5f04c34d2..4eebc33437 100644 --- a/keyboards/keychron/q0/rev_0131/rules.mk +++ b/keyboards/keychron/q0/rev_0131/rules.mk @@ -1,19 +1,3 @@ -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # Enable USB N-key Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output -ENCODER_ENABLE = yes # Enable encoder -DIP_SWITCH_ENABLE = no -RGB_MATRIX_ENABLE = yes -RGB_MATRIX_DRIVER = CKLED2001 EEPROM_DRIVER = wear_leveling WEAR_LEVELING_DRIVER = embedded_flash diff --git a/keyboards/keychron/q1/ansi/ansi.c b/keyboards/keychron/q1/ansi/ansi.c index fc22d1aff3..ee586fef93 100644 --- a/keyboards/keychron/q1/ansi/ansi.c +++ b/keyboards/keychron/q1/ansi/ansi.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ansi.h" +#include "quantum.h" #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/q1/ansi/ansi.h b/keyboards/keychron/q1/ansi/ansi.h deleted file mode 100644 index db52563dc4..0000000000 --- a/keyboards/keychron/q1/ansi/ansi.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2021 @ Keychron (https://www.keychron.com) - * - * 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" diff --git a/keyboards/keychron/q1/ansi/config.h b/keyboards/keychron/q1/ansi/config.h index 0a30f7d82d..c6d4e44c87 100644 --- a/keyboards/keychron/q1/ansi/config.h +++ b/keyboards/keychron/q1/ansi/config.h @@ -16,10 +16,6 @@ #pragma once -/* key matrix pins */ -#define MATRIX_ROW_PINS { D3, D2, B3, B2, B1, B0 } -#define MATRIX_COL_PINS { D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6, F5, F4, F1, F0 } - /* RGB Matrix Configuration */ #define DRIVER_1_LED_TOTAL 59 #define DRIVER_2_LED_TOTAL 23 diff --git a/keyboards/keychron/q1/ansi/info.json b/keyboards/keychron/q1/ansi/info.json index 63602d71c5..c878317063 100644 --- a/keyboards/keychron/q1/ansi/info.json +++ b/keyboards/keychron/q1/ansi/info.json @@ -8,6 +8,11 @@ "pid": "0x0100", "device_version": "1.0.0" }, + "matrix_pins": { + "cols": ["D5", "D4", "D6", "D7", "B4", "B5", "B6", "C6", "C7", "F7", "F6", "F5", "F4", "F1", "F0"], + "rows": ["D3", "D2", "B3", "B2", "B1", "B0"] + }, + "diode_direction": "ROW2COL", "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/keychron/q1/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q1/ansi_encoder/ansi_encoder.c index 5909b993e3..bc559b3541 100644 --- a/keyboards/keychron/q1/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/q1/ansi_encoder/ansi_encoder.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ansi_encoder.h" +#include "quantum.h" #ifdef RGB_MATRIX_ENABLE const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { diff --git a/keyboards/keychron/q1/ansi_encoder/ansi_encoder.h b/keyboards/keychron/q1/ansi_encoder/ansi_encoder.h deleted file mode 100644 index db52563dc4..0000000000 --- a/keyboards/keychron/q1/ansi_encoder/ansi_encoder.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2021 @ Keychron (https://www.keychron.com) - * - * 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" diff --git a/keyboards/keychron/q1/ansi_encoder/config.h b/keyboards/keychron/q1/ansi_encoder/config.h index a41976d560..28bbea9087 100644 --- a/keyboards/keychron/q1/ansi_encoder/config.h +++ b/keyboards/keychron/q1/ansi_encoder/config.h @@ -16,10 +16,6 @@ #pragma once -/* key matrix pins */ -#define MATRIX_ROW_PINS { D3, D2, B3, B2, B1, B0 } -#define MATRIX_COL_PINS { D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6, F5, F4, F1, F0 } - /* RGB Matrix Configuration */ #define DRIVER_1_LED_TOTAL 59 #define DRIVER_2_LED_TOTAL 23 diff --git a/keyboards/keychron/q1/ansi_encoder/info.json b/keyboards/keychron/q1/ansi_encoder/info.json index 2391e674ad..9b1f1ba014 100644 --- a/keyboards/keychron/q1/ansi_encoder/info.json +++ b/keyboards/keychron/q1/ansi_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0101", "device_version": "1.0.0" }, + "matrix_pins": { + "cols": ["D5", "D4", "D6", "D7", "B4", "B5", "B6", "C6", "C7", "F7", "F6", "F5", "F4", "F1", "F0"], + "rows": ["D3", "D2", "B3", "B2", "B1", "B0"] + }, + "diode_direction": "ROW2COL", "encoder": { "rotary": [ {"pin_a": "E6", "pin_b": "B7"} diff --git a/keyboards/keychron/q1/config.h b/keyboards/keychron/q1/config.h index a49ec41a06..a87754e9f2 100644 --- a/keyboards/keychron/q1/config.h +++ b/keyboards/keychron/q1/config.h @@ -16,9 +16,6 @@ #pragma once -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION ROW2COL - /* RGB Matrix Driver Configuration */ #define DRIVER_COUNT 2 #define DRIVER_ADDR_1 0b1010000 diff --git a/keyboards/keychron/q1/iso/config.h b/keyboards/keychron/q1/iso/config.h index b9b33cf320..cb7b05560a 100644 --- a/keyboards/keychron/q1/iso/config.h +++ b/keyboards/keychron/q1/iso/config.h @@ -16,10 +16,6 @@ #pragma once -/* key matrix pins */ -#define MATRIX_ROW_PINS { D3, D2, B3, B2, B1, B0 } -#define MATRIX_COL_PINS { D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6, F5, F4, F1, F0 } - /* RGB Matrix Configuration */ #define DRIVER_1_LED_TOTAL 59 #define DRIVER_2_LED_TOTAL 24 diff --git a/keyboards/keychron/q1/iso/info.json b/keyboards/keychron/q1/iso/info.json index d8f5205f5f..447a246471 100644 --- a/keyboards/keychron/q1/iso/info.json +++ b/keyboards/keychron/q1/iso/info.json @@ -8,6 +8,11 @@ "pid": "0x0102", "device_version": "1.0.0" }, + "matrix_pins": { + "cols": ["D5", "D4", "D6", "D7", "B4", "B5", "B6", "C6", "C7", "F7", "F6", "F5", "F4", "F1", "F0"], + "rows": ["D3", "D2", "B3", "B2", "B1", "B0"] + }, + "diode_direction": "ROW2COL", "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/keychron/q1/iso/iso.c b/keyboards/keychron/q1/iso/iso.c index c8e3165bd3..619d89dffc 100644 --- a/keyboards/keychron/q1/iso/iso.c +++ b/keyboards/keychron/q1/iso/iso.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "iso.h" +#include "quantum.h" #ifdef RGB_MATRIX_ENABLE const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { diff --git a/keyboards/keychron/q1/iso/iso.h b/keyboards/keychron/q1/iso/iso.h deleted file mode 100644 index db52563dc4..0000000000 --- a/keyboards/keychron/q1/iso/iso.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2021 @ Keychron (https://www.keychron.com) - * - * 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" diff --git a/keyboards/keychron/q1/iso_encoder/config.h b/keyboards/keychron/q1/iso_encoder/config.h index b52fb88383..c1e84e44d3 100644 --- a/keyboards/keychron/q1/iso_encoder/config.h +++ b/keyboards/keychron/q1/iso_encoder/config.h @@ -16,10 +16,6 @@ #pragma once -/* key matrix pins */ -#define MATRIX_ROW_PINS { D3, D2, B3, B2, B1, B0 } -#define MATRIX_COL_PINS { D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6, F5, F4, F1, F0 } - /* DIP switch */ #define DIP_SWITCH_MATRIX_GRID { {0,1} } diff --git a/keyboards/keychron/q1/iso_encoder/info.json b/keyboards/keychron/q1/iso_encoder/info.json index e4dce374c8..ceee988875 100644 --- a/keyboards/keychron/q1/iso_encoder/info.json +++ b/keyboards/keychron/q1/iso_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0103", "device_version": "1.0.2" }, + "matrix_pins": { + "cols": ["D5", "D4", "D6", "D7", "B4", "B5", "B6", "C6", "C7", "F7", "F6", "F5", "F4", "F1", "F0"], + "rows": ["D3", "D2", "B3", "B2", "B1", "B0"] + }, + "diode_direction": "ROW2COL", "encoder": { "rotary": [ {"pin_a": "E6", "pin_b": "B7"} diff --git a/keyboards/keychron/q1/iso_encoder/iso_encoder.c b/keyboards/keychron/q1/iso_encoder/iso_encoder.c index c6563ad318..c6b091fff1 100644 --- a/keyboards/keychron/q1/iso_encoder/iso_encoder.c +++ b/keyboards/keychron/q1/iso_encoder/iso_encoder.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "iso_encoder.h" +#include "quantum.h" #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/q1/iso_encoder/iso_encoder.h b/keyboards/keychron/q1/iso_encoder/iso_encoder.h deleted file mode 100644 index d62d707b4a..0000000000 --- a/keyboards/keychron/q1/iso_encoder/iso_encoder.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2021 @ Keychron (https://www.keychron.com) - * - * 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"
\ No newline at end of file diff --git a/keyboards/keychron/q1/q1.c b/keyboards/keychron/q1/q1.c index aa0789e852..3df62c4339 100644 --- a/keyboards/keychron/q1/q1.c +++ b/keyboards/keychron/q1/q1.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "q1.h" +#include "quantum.h" const matrix_row_t matrix_mask[] = { 0b0111111111111101, diff --git a/keyboards/keychron/q1/q1.h b/keyboards/keychron/q1/q1.h deleted file mode 100644 index d706779910..0000000000 --- a/keyboards/keychron/q1/q1.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright 2021 @ Keychron (https://www.keychron.com) - * - * 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" - -#if defined(KEYBOARD_keychron_q1_ansi) -# include "ansi.h" -#elif defined(KEYBOARD_keychron_q1_ansi_encoder) -# include "ansi_encoder.h" -#elif defined(KEYBOARD_keychron_q1_iso) -# include "iso.h" -#elif defined(KEYBOARD_keychron_q1_iso_encoder) -# include "iso_encoder.h" -#endif diff --git a/keyboards/keychron/q10/ansi_encoder/ansi_encoder.h b/keyboards/keychron/q10/ansi_encoder/ansi_encoder.h deleted file mode 100644 index db52563dc4..0000000000 --- a/keyboards/keychron/q10/ansi_encoder/ansi_encoder.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2021 @ Keychron (https://www.keychron.com) - * - * 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" diff --git a/keyboards/keychron/q10/iso_encoder/iso_encoder.h b/keyboards/keychron/q10/iso_encoder/iso_encoder.h deleted file mode 100644 index db52563dc4..0000000000 --- a/keyboards/keychron/q10/iso_encoder/iso_encoder.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2021 @ Keychron (https://www.keychron.com) - * - * 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" diff --git a/keyboards/keychron/q10/q10.c b/keyboards/keychron/q10/q10.c index c823e6939f..455a2a25f2 100644 --- a/keyboards/keychron/q10/q10.c +++ b/keyboards/keychron/q10/q10.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "q10.h" +#include "quantum.h" const matrix_row_t matrix_mask[] = { 0b1111111111111111, diff --git a/keyboards/keychron/q10/q10.h b/keyboards/keychron/q10/q10.h deleted file mode 100644 index 80e747aca3..0000000000 --- a/keyboards/keychron/q10/q10.h +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright 2022 @ Keychron (https://www.keychron.com) - * - * 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" - -#if defined(KEYBOARD_keychron_q10_ansi_encoder) -# include "ansi_encoder.h" -#elif defined(KEYBOARD_keychron_q10_iso_encoder) -# include "iso_encoder.h" -#endif diff --git a/keyboards/keychron/q2/ansi/ansi.c b/keyboards/keychron/q2/ansi/ansi.c index 5c5acb3fd8..28f91269c4 100644 --- a/keyboards/keychron/q2/ansi/ansi.c +++ b/keyboards/keychron/q2/ansi/ansi.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ansi.h" +#include "quantum.h" #ifdef RGB_MATRIX_ENABLE const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { diff --git a/keyboards/keychron/q2/ansi/ansi.h b/keyboards/keychron/q2/ansi/ansi.h deleted file mode 100644 index db52563dc4..0000000000 --- a/keyboards/keychron/q2/ansi/ansi.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2021 @ Keychron (https://www.keychron.com) - * - * 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" diff --git a/keyboards/keychron/q2/ansi/info.json b/keyboards/keychron/q2/ansi/info.json index 054786185a..eac3fc529c 100644 --- a/keyboards/keychron/q2/ansi/info.json +++ b/keyboards/keychron/q2/ansi/info.json @@ -8,6 +8,11 @@ "pid": "0x0110", "device_version": "1.0.0" }, + "matrix_pins": { + "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], + "rows": ["B4", "B3", "A15", "A14", "A13"] + }, + "diode_direction": "ROW2COL", "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/q2/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q2/ansi_encoder/ansi_encoder.c index c926a5bf75..28f91269c4 100644 --- a/keyboards/keychron/q2/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/q2/ansi_encoder/ansi_encoder.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ansi_encoder.h" +#include "quantum.h" #ifdef RGB_MATRIX_ENABLE const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { diff --git a/keyboards/keychron/q2/ansi_encoder/ansi_encoder.h b/keyboards/keychron/q2/ansi_encoder/ansi_encoder.h deleted file mode 100644 index db52563dc4..0000000000 --- a/keyboards/keychron/q2/ansi_encoder/ansi_encoder.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2021 @ Keychron (https://www.keychron.com) - * - * 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" diff --git a/keyboards/keychron/q2/ansi_encoder/info.json b/keyboards/keychron/q2/ansi_encoder/info.json index a2a12dc39c..e0f7c6cebd 100644 --- a/keyboards/keychron/q2/ansi_encoder/info.json +++ b/keyboards/keychron/q2/ansi_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0111", "device_version": "1.0.0" }, + "matrix_pins": { + "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], + "rows": ["B4", "B3", "A15", "A14", "A13"] + }, + "diode_direction": "ROW2COL", "encoder": { "rotary": [ {"pin_a": "A10", "pin_b": "B5"} diff --git a/keyboards/keychron/q2/config.h b/keyboards/keychron/q2/config.h index e421906a68..63e31cd01d 100644 --- a/keyboards/keychron/q2/config.h +++ b/keyboards/keychron/q2/config.h @@ -16,18 +16,11 @@ #pragma once -/* key matrix pins */ -#define MATRIX_ROW_PINS { B4, B3, A15, A14, A13 } -#define MATRIX_COL_PINS { C14, C15, A0, A1, A2, A3, A4, A5, A6, A7, B0, B1, A8, A9, H3 } - #define MATRIX_UNSELECT_DRIVE_HIGH /* DIP switch */ #define DIP_SWITCH_MATRIX_GRID { {4, 4} } -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION ROW2COL - /* RGB Matrix Driver Configuration */ #define DRIVER_COUNT 2 #define DRIVER_ADDR_1 0b1110111 diff --git a/keyboards/keychron/q2/iso/info.json b/keyboards/keychron/q2/iso/info.json index e295fcef18..afc1079ae1 100644 --- a/keyboards/keychron/q2/iso/info.json +++ b/keyboards/keychron/q2/iso/info.json @@ -8,6 +8,11 @@ "pid": "0x0112", "device_version": "1.0.0" }, + "matrix_pins": { + "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], + "rows": ["B4", "B3", "A15", "A14", "A13"] + }, + "diode_direction": "ROW2COL", "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/q2/iso/iso.c b/keyboards/keychron/q2/iso/iso.c index 7f8d388b0e..1f2c76468e 100644 --- a/keyboards/keychron/q2/iso/iso.c +++ b/keyboards/keychron/q2/iso/iso.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "iso.h" +#include "quantum.h" #ifdef RGB_MATRIX_ENABLE const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { diff --git a/keyboards/keychron/q2/iso/iso.h b/keyboards/keychron/q2/iso/iso.h deleted file mode 100644 index db52563dc4..0000000000 --- a/keyboards/keychron/q2/iso/iso.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2021 @ Keychron (https://www.keychron.com) - * - * 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" diff --git a/keyboards/keychron/q2/iso_encoder/info.json b/keyboards/keychron/q2/iso_encoder/info.json index 028522c259..249813f517 100644 --- a/keyboards/keychron/q2/iso_encoder/info.json +++ b/keyboards/keychron/q2/iso_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0113", "device_version": "1.0.0" }, + "matrix_pins": { + "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], + "rows": ["B4", "B3", "A15", "A14", "A13"] + }, + "diode_direction": "ROW2COL", "encoder": { "rotary": [ {"pin_a": "A10", "pin_b": "B5"} diff --git a/keyboards/keychron/q2/iso_encoder/iso_encoder.c b/keyboards/keychron/q2/iso_encoder/iso_encoder.c index af7b818149..1f2c76468e 100644 --- a/keyboards/keychron/q2/iso_encoder/iso_encoder.c +++ b/keyboards/keychron/q2/iso_encoder/iso_encoder.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "iso_encoder.h" +#include "quantum.h" #ifdef RGB_MATRIX_ENABLE const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { diff --git a/keyboards/keychron/q2/iso_encoder/iso_encoder.h b/keyboards/keychron/q2/iso_encoder/iso_encoder.h deleted file mode 100644 index db52563dc4..0000000000 --- a/keyboards/keychron/q2/iso_encoder/iso_encoder.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2021 @ Keychron (https://www.keychron.com) - * - * 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" diff --git a/keyboards/keychron/q2/jis/info.json b/keyboards/keychron/q2/jis/info.json index d41bf49cb2..f36cda421f 100644 --- a/keyboards/keychron/q2/jis/info.json +++ b/keyboards/keychron/q2/jis/info.json @@ -8,6 +8,11 @@ "pid": "0x0114", "device_version": "1.0.0" }, + "matrix_pins": { + "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], + "rows": ["B4", "B3", "A15", "A14", "A13"] + }, + "diode_direction": "ROW2COL", "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/q2/jis_encoder/info.json b/keyboards/keychron/q2/jis_encoder/info.json index 18e800703b..9e217dddea 100644 --- a/keyboards/keychron/q2/jis_encoder/info.json +++ b/keyboards/keychron/q2/jis_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0115", "device_version": "1.0.0" }, + "matrix_pins": { + "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], + "rows": ["B4", "B3", "A15", "A14", "A13"] + }, + "diode_direction": "ROW2COL", "encoder": { "rotary": [ {"pin_a": "A10", "pin_b": "B5"} diff --git a/keyboards/keychron/q2/q2.c b/keyboards/keychron/q2/q2.c index 13b2238d17..7ff85556de 100644 --- a/keyboards/keychron/q2/q2.c +++ b/keyboards/keychron/q2/q2.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "q2.h" +#include "quantum.h" const matrix_row_t matrix_mask[] = { 0b1111111111111111, diff --git a/keyboards/keychron/q2/q2.h b/keyboards/keychron/q2/q2.h deleted file mode 100644 index a256ceae6a..0000000000 --- a/keyboards/keychron/q2/q2.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright 2021 @ Keychron (https://www.keychron.com) - * - * 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" - -#if defined(KEYBOARD_keychron_q2_ansi) -# include "ansi.h" -#elif defined(KEYBOARD_keychron_q2_ansi_encoder) -# include "ansi_encoder.h" -#elif defined(KEYBOARD_keychron_q2_iso) -# include "iso.h" -#elif defined(KEYBOARD_keychron_q2_iso_encoder) -# include "iso_encoder.h" -#endif diff --git a/keyboards/keychron/q3/ansi/ansi.c b/keyboards/keychron/q3/ansi/ansi.c index beff3bc5ec..432a914058 100644 --- a/keyboards/keychron/q3/ansi/ansi.c +++ b/keyboards/keychron/q3/ansi/ansi.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ansi.h" +#include "quantum.h" #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/q3/ansi/ansi.h b/keyboards/keychron/q3/ansi/ansi.h deleted file mode 100644 index de5b0aedb1..0000000000 --- a/keyboards/keychron/q3/ansi/ansi.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2022 @ Keychron (https://www.keychron.com) - * - * 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" diff --git a/keyboards/keychron/q3/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q3/ansi_encoder/ansi_encoder.c index 13f6c26d2d..f873f77d12 100644 --- a/keyboards/keychron/q3/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/q3/ansi_encoder/ansi_encoder.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ansi_encoder.h" +#include "quantum.h" #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/q3/ansi_encoder/ansi_encoder.h b/keyboards/keychron/q3/ansi_encoder/ansi_encoder.h deleted file mode 100644 index de5b0aedb1..0000000000 --- a/keyboards/keychron/q3/ansi_encoder/ansi_encoder.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2022 @ Keychron (https://www.keychron.com) - * - * 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" diff --git a/keyboards/keychron/q3/iso/iso.c b/keyboards/keychron/q3/iso/iso.c index e753a39c1b..d747d55115 100644 --- a/keyboards/keychron/q3/iso/iso.c +++ b/keyboards/keychron/q3/iso/iso.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "iso.h" +#include "quantum.h" #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/q3/iso/iso.h b/keyboards/keychron/q3/iso/iso.h deleted file mode 100644 index de5b0aedb1..0000000000 --- a/keyboards/keychron/q3/iso/iso.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2022 @ Keychron (https://www.keychron.com) - * - * 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" diff --git a/keyboards/keychron/q3/iso_encoder/iso_encoder.c b/keyboards/keychron/q3/iso_encoder/iso_encoder.c index 02aac01ddc..d2bb169aac 100644 --- a/keyboards/keychron/q3/iso_encoder/iso_encoder.c +++ b/keyboards/keychron/q3/iso_encoder/iso_encoder.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "iso_encoder.h" +#include "quantum.h" #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/q3/iso_encoder/iso_encoder.h b/keyboards/keychron/q3/iso_encoder/iso_encoder.h deleted file mode 100644 index de5b0aedb1..0000000000 --- a/keyboards/keychron/q3/iso_encoder/iso_encoder.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2022 @ Keychron (https://www.keychron.com) - * - * 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" diff --git a/keyboards/keychron/q3/jis/jis.c b/keyboards/keychron/q3/jis/jis.c index 20983c6a5f..f262d3c7d8 100644 --- a/keyboards/keychron/q3/jis/jis.c +++ b/keyboards/keychron/q3/jis/jis.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "jis.h" +#include "quantum.h" #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/q3/jis/jis.h b/keyboards/keychron/q3/jis/jis.h deleted file mode 100644 index de5b0aedb1..0000000000 --- a/keyboards/keychron/q3/jis/jis.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2022 @ Keychron (https://www.keychron.com) - * - * 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" diff --git a/keyboards/keychron/q3/jis_encoder/jis_encoder.c b/keyboards/keychron/q3/jis_encoder/jis_encoder.c index efaf5fc5f2..0a97c5ca68 100644 --- a/keyboards/keychron/q3/jis_encoder/jis_encoder.c +++ b/keyboards/keychron/q3/jis_encoder/jis_encoder.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "jis_encoder.h" +#include "quantum.h" #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/q3/jis_encoder/jis_encoder.h b/keyboards/keychron/q3/jis_encoder/jis_encoder.h deleted file mode 100644 index de5b0aedb1..0000000000 --- a/keyboards/keychron/q3/jis_encoder/jis_encoder.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2022 @ Keychron (https://www.keychron.com) - * - * 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" diff --git a/keyboards/keychron/q3/q3.c b/keyboards/keychron/q3/q3.c index 120013e77e..2bf8bf08a0 100644 --- a/keyboards/keychron/q3/q3.c +++ b/keyboards/keychron/q3/q3.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "q3.h" +#include "quantum.h" #include "rgb_matrix.h" // clang-format off diff --git a/keyboards/keychron/q3/q3.h b/keyboards/keychron/q3/q3.h deleted file mode 100644 index bc2d458bb7..0000000000 --- a/keyboards/keychron/q3/q3.h +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright 2022 @ Keychron (https://www.keychron.com) - * - * 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" - -#if defined(KEYBOARD_keychron_q3_ansi) -# include "ansi.h" -#elif defined(KEYBOARD_keychron_q3_ansi_encoder) -# include "ansi_encoder.h" -#elif defined(KEYBOARD_keychron_q3_iso) -# include "iso.h" -#elif defined(KEYBOARD_keychron_q3_iso_encoder) -# include "iso_encoder.h" -#elif defined(KEYBOARD_keychron_q3_jis) -# include "jis.h" -#elif defined(KEYBOARD_keychron_q3_jis_encoder) -# include "jis_encoder.h" -#endif diff --git a/keyboards/keychron/q4/ansi_v1/ansi_v1.c b/keyboards/keychron/q4/ansi_v1/ansi_v1.c index e651744262..88599103ef 100644 --- a/keyboards/keychron/q4/ansi_v1/ansi_v1.c +++ b/keyboards/keychron/q4/ansi_v1/ansi_v1.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ansi_v1.h" +#include "quantum.h" #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/q4/ansi_v1/ansi_v1.h b/keyboards/keychron/q4/ansi_v1/ansi_v1.h deleted file mode 100644 index 381c674dad..0000000000 --- a/keyboards/keychron/q4/ansi_v1/ansi_v1.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2022 @ Keychron (https://www.keychron.com) - * - * 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"
\ No newline at end of file diff --git a/keyboards/keychron/q4/ansi_v1/info.json b/keyboards/keychron/q4/ansi_v1/info.json index f24a4acba5..cb0fc55e3f 100644 --- a/keyboards/keychron/q4/ansi_v1/info.json +++ b/keyboards/keychron/q4/ansi_v1/info.json @@ -8,6 +8,11 @@ "pid": "0x0140", "device_version": "1.0.0" }, + "matrix_pins": { + "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9"], + "rows": ["B4", "B3", "A15", "A14", "A13"] + }, + "diode_direction": "ROW2COL", "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/q4/ansi_v2/ansi_v2.h b/keyboards/keychron/q4/ansi_v2/ansi_v2.h deleted file mode 100644 index de5b0aedb1..0000000000 --- a/keyboards/keychron/q4/ansi_v2/ansi_v2.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2022 @ Keychron (https://www.keychron.com) - * - * 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" diff --git a/keyboards/keychron/q4/ansi_v2/info.json b/keyboards/keychron/q4/ansi_v2/info.json index f24a4acba5..cb0fc55e3f 100644 --- a/keyboards/keychron/q4/ansi_v2/info.json +++ b/keyboards/keychron/q4/ansi_v2/info.json @@ -8,6 +8,11 @@ "pid": "0x0140", "device_version": "1.0.0" }, + "matrix_pins": { + "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9"], + "rows": ["B4", "B3", "A15", "A14", "A13"] + }, + "diode_direction": "ROW2COL", "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/q4/config.h b/keyboards/keychron/q4/config.h index 08549247f3..940ee44e77 100644 --- a/keyboards/keychron/q4/config.h +++ b/keyboards/keychron/q4/config.h @@ -16,13 +16,6 @@ #pragma once -/* key matrix pins */ -#define MATRIX_ROW_PINS { B4, B3, A15, A14, A13 } -#define MATRIX_COL_PINS { C14, C15, A0, A1, A2, A3, A4, A5, A6, A7, B0, B1, A8, A9 } - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION ROW2COL - /* DIP switch */ #define DIP_SWITCH_MATRIX_GRID { {4,4} } diff --git a/keyboards/keychron/q4/iso/info.json b/keyboards/keychron/q4/iso/info.json index 9c65fa29d1..908c5bdae1 100644 --- a/keyboards/keychron/q4/iso/info.json +++ b/keyboards/keychron/q4/iso/info.json @@ -8,6 +8,11 @@ "pid": "0x0142", "device_version": "1.0.0" }, + "matrix_pins": { + "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9"], + "rows": ["B4", "B3", "A15", "A14", "A13"] + }, + "diode_direction": "ROW2COL", "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/q4/iso/iso.c b/keyboards/keychron/q4/iso/iso.c index c1d1982b94..24cbcfd745 100644 --- a/keyboards/keychron/q4/iso/iso.c +++ b/keyboards/keychron/q4/iso/iso.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "iso.h" +#include "quantum.h" #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/q4/iso/iso.h b/keyboards/keychron/q4/iso/iso.h deleted file mode 100644 index 381c674dad..0000000000 --- a/keyboards/keychron/q4/iso/iso.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2022 @ Keychron (https://www.keychron.com) - * - * 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"
\ No newline at end of file diff --git a/keyboards/keychron/q4/q4.c b/keyboards/keychron/q4/q4.c index 6d31e45607..c3cb67bcc2 100644 --- a/keyboards/keychron/q4/q4.c +++ b/keyboards/keychron/q4/q4.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "q4.h" +#include "quantum.h" const matrix_row_t matrix_mask[] = { 0b11111111111111, diff --git a/keyboards/keychron/q4/q4.h b/keyboards/keychron/q4/q4.h deleted file mode 100644 index 34aa4a8505..0000000000 --- a/keyboards/keychron/q4/q4.h +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright 2022 @ Keychron (https://www.keychron.com) - * - * 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" - -#if defined(KEYBOARD_keychron_q4_ansi_v1) -# include "ansi_v1.h" -#elif defined(KEYBOARD_keychron_q4_ansi_v2) -# include "ansi_v2.h" -#elif defined(KEYBOARD_keychron_q4_iso) -# include "iso.h" -#endif diff --git a/keyboards/keychron/q5/ansi/ansi.c b/keyboards/keychron/q5/ansi/ansi.c index 6aeb46c07d..dda563cd79 100644 --- a/keyboards/keychron/q5/ansi/ansi.c +++ b/keyboards/keychron/q5/ansi/ansi.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ansi.h" +#include "quantum.h" #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/q5/ansi/ansi.h b/keyboards/keychron/q5/ansi/ansi.h deleted file mode 100644 index de5b0aedb1..0000000000 --- a/keyboards/keychron/q5/ansi/ansi.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2022 @ Keychron (https://www.keychron.com) - * - * 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" diff --git a/keyboards/keychron/q5/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q5/ansi_encoder/ansi_encoder.c index 43c27433b2..4d3cc0f036 100644 --- a/keyboards/keychron/q5/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/q5/ansi_encoder/ansi_encoder.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ansi_encoder.h" +#include "quantum.h" #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/q5/ansi_encoder/ansi_encoder.h b/keyboards/keychron/q5/ansi_encoder/ansi_encoder.h deleted file mode 100644 index de5b0aedb1..0000000000 --- a/keyboards/keychron/q5/ansi_encoder/ansi_encoder.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2022 @ Keychron (https://www.keychron.com) - * - * 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" diff --git a/keyboards/keychron/q5/iso/iso.c b/keyboards/keychron/q5/iso/iso.c index b57474f535..65924abd76 100644 --- a/keyboards/keychron/q5/iso/iso.c +++ b/keyboards/keychron/q5/iso/iso.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "iso.h" +#include "quantum.h" #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/q5/iso/iso.h b/keyboards/keychron/q5/iso/iso.h deleted file mode 100644 index de5b0aedb1..0000000000 --- a/keyboards/keychron/q5/iso/iso.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2022 @ Keychron (https://www.keychron.com) - * - * 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" diff --git a/keyboards/keychron/q5/iso_encoder/iso_encoder.c b/keyboards/keychron/q5/iso_encoder/iso_encoder.c index 8ae11bc36b..22ba9e2d4e 100644 --- a/keyboards/keychron/q5/iso_encoder/iso_encoder.c +++ b/keyboards/keychron/q5/iso_encoder/iso_encoder.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "iso_encoder.h" +#include "quantum.h" #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/q5/iso_encoder/iso_encoder.h b/keyboards/keychron/q5/iso_encoder/iso_encoder.h deleted file mode 100644 index de5b0aedb1..0000000000 --- a/keyboards/keychron/q5/iso_encoder/iso_encoder.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2022 @ Keychron (https://www.keychron.com) - * - * 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" diff --git a/keyboards/keychron/q5/q5.c b/keyboards/keychron/q5/q5.c index 4130dcebe3..7a1cabcd1a 100644 --- a/keyboards/keychron/q5/q5.c +++ b/keyboards/keychron/q5/q5.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "q5.h" +#include "quantum.h" const matrix_row_t matrix_mask[] = { 0b111111111111111111, diff --git a/keyboards/keychron/q5/q5.h b/keyboards/keychron/q5/q5.h deleted file mode 100644 index 70ccc8dcfa..0000000000 --- a/keyboards/keychron/q5/q5.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright 2022 @ Keychron (https://www.keychron.com) - * - * 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" - -#if defined(KEYBOARD_keychron_q5_ansi) -# include "ansi.h" -#elif defined(KEYBOARD_keychron_q5_ansi_encoder) -# include "ansi_encoder.h" -#elif defined(KEYBOARD_keychron_q5_iso) -# include "iso.h" -#elif defined(KEYBOARD_keychron_q5_iso_encoder) -# include "iso_encoder.h" -#endif diff --git a/keyboards/keychron/q6/ansi/ansi.c b/keyboards/keychron/q6/ansi/ansi.c index 982996d347..a81d5f9e9f 100644 --- a/keyboards/keychron/q6/ansi/ansi.c +++ b/keyboards/keychron/q6/ansi/ansi.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ansi.h" +#include "quantum.h" #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/q6/ansi/ansi.h b/keyboards/keychron/q6/ansi/ansi.h deleted file mode 100644 index de5b0aedb1..0000000000 --- a/keyboards/keychron/q6/ansi/ansi.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2022 @ Keychron (https://www.keychron.com) - * - * 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" diff --git a/keyboards/keychron/q6/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q6/ansi_encoder/ansi_encoder.c index 6cf593dd25..6fbece3678 100644 --- a/keyboards/keychron/q6/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/q6/ansi_encoder/ansi_encoder.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ansi_encoder.h" +#include "quantum.h" #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/q6/ansi_encoder/ansi_encoder.h b/keyboards/keychron/q6/ansi_encoder/ansi_encoder.h deleted file mode 100644 index de5b0aedb1..0000000000 --- a/keyboards/keychron/q6/ansi_encoder/ansi_encoder.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2022 @ Keychron (https://www.keychron.com) - * - * 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" diff --git a/keyboards/keychron/q6/iso/iso.c b/keyboards/keychron/q6/iso/iso.c index d8c4add867..f2081177e9 100644 --- a/keyboards/keychron/q6/iso/iso.c +++ b/keyboards/keychron/q6/iso/iso.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "iso.h" +#include "quantum.h" #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/q6/iso/iso.h b/keyboards/keychron/q6/iso/iso.h deleted file mode 100644 index de5b0aedb1..0000000000 --- a/keyboards/keychron/q6/iso/iso.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2022 @ Keychron (https://www.keychron.com) - * - * 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" diff --git a/keyboards/keychron/q6/iso_encoder/iso_encoder.c b/keyboards/keychron/q6/iso_encoder/iso_encoder.c index c6a21a6223..e9a6f6edfc 100644 --- a/keyboards/keychron/q6/iso_encoder/iso_encoder.c +++ b/keyboards/keychron/q6/iso_encoder/iso_encoder.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "iso_encoder.h" +#include "quantum.h" #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/q6/iso_encoder/iso_encoder.h b/keyboards/keychron/q6/iso_encoder/iso_encoder.h deleted file mode 100644 index de5b0aedb1..0000000000 --- a/keyboards/keychron/q6/iso_encoder/iso_encoder.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2022 @ Keychron (https://www.keychron.com) - * - * 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" diff --git a/keyboards/keychron/q6/q6.c b/keyboards/keychron/q6/q6.c index d2f9d2aa4e..8a9750e9de 100644 --- a/keyboards/keychron/q6/q6.c +++ b/keyboards/keychron/q6/q6.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "q6.h" +#include "quantum.h" const matrix_row_t matrix_mask[] = { 0b11111111111111111111, diff --git a/keyboards/keychron/q6/q6.h b/keyboards/keychron/q6/q6.h deleted file mode 100644 index 9e878e700c..0000000000 --- a/keyboards/keychron/q6/q6.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright 2022 @ Keychron (https://www.keychron.com) - * - * 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" - -#if defined(KEYBOARD_keychron_q6_ansi) -# include "ansi.h" -#elif defined(KEYBOARD_keychron_q6_ansi_encoder) -# include "ansi_encoder.h" -#elif defined(KEYBOARD_keychron_q6_iso) -# include "iso.h" -#elif defined(KEYBOARD_keychron_q6_iso_encoder) -# include "iso_encoder.h" -#endif diff --git a/keyboards/keychron/q60/ansi/info.json b/keyboards/keychron/q60/ansi/info.json index c64de7b5e2..cf4e86f8aa 100644 --- a/keyboards/keychron/q60/ansi/info.json +++ b/keyboards/keychron/q60/ansi/info.json @@ -8,6 +8,11 @@ "pid": "0x01C0", "device_version": "1.0.0" }, + "matrix_pins": { + "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9"], + "rows": ["B4", "B3", "A15", "A14", "A13"] + }, + "diode_direction": "ROW2COL", "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/q60/config.h b/keyboards/keychron/q60/config.h index bd192cd8bd..779feea4ce 100644 --- a/keyboards/keychron/q60/config.h +++ b/keyboards/keychron/q60/config.h @@ -16,15 +16,6 @@ #pragma once -/* key matrix pins */ -#define MATRIX_ROW_PINS \ - { B4, B3, A15, A14, A13 } -#define MATRIX_COL_PINS \ - { C14, C15, A0, A1, A2, A3, A4, A5, A6, A7, B0, B1, A8, A9 } - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION ROW2COL - /* RGB Matrix Driver Configuration */ #define DRIVER_COUNT 1 #define DRIVER_ADDR_1 0b1110100 diff --git a/keyboards/keychron/q7/ansi/info.json b/keyboards/keychron/q7/ansi/info.json index dbbc462a6d..00240fd6a3 100644 --- a/keyboards/keychron/q7/ansi/info.json +++ b/keyboards/keychron/q7/ansi/info.json @@ -8,6 +8,11 @@ "pid": "0x0170", "device_version": "1.0.0" }, + "matrix_pins": { + "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "A10", "B5"], + "rows": ["B4", "B3", "A15", "A14", "A13"] + }, + "diode_direction": "ROW2COL", "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/q7/config.h b/keyboards/keychron/q7/config.h index f0a545bd98..0ea9ee5f46 100644 --- a/keyboards/keychron/q7/config.h +++ b/keyboards/keychron/q7/config.h @@ -16,13 +16,6 @@ #pragma once -/* key matrix pins */ -#define MATRIX_ROW_PINS { B4, B3, A15, A14, A13 } -#define MATRIX_COL_PINS { C14, C15, A0, A1, A2, A3, A4, A5, A6, A7, B0, B1, A8, A9, A10, B5 } - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION ROW2COL - /* RGB Matrix Driver Configuration */ #define DRIVER_COUNT 2 #define DRIVER_ADDR_1 0b1110111 diff --git a/keyboards/keychron/q7/iso/info.json b/keyboards/keychron/q7/iso/info.json index 876412d7b6..b060b570b9 100644 --- a/keyboards/keychron/q7/iso/info.json +++ b/keyboards/keychron/q7/iso/info.json @@ -8,6 +8,11 @@ "pid": "0x0172", "device_version": "1.0.0" }, + "matrix_pins": { + "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "A10", "B5"], + "rows": ["B4", "B3", "A15", "A14", "A13"] + }, + "diode_direction": "ROW2COL", "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/q8/ansi/ansi.h b/keyboards/keychron/q8/ansi/ansi.h deleted file mode 100644 index db52563dc4..0000000000 --- a/keyboards/keychron/q8/ansi/ansi.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2021 @ Keychron (https://www.keychron.com) - * - * 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" diff --git a/keyboards/keychron/q8/ansi/info.json b/keyboards/keychron/q8/ansi/info.json index b80cb42432..96efa35d26 100644 --- a/keyboards/keychron/q8/ansi/info.json +++ b/keyboards/keychron/q8/ansi/info.json @@ -8,6 +8,11 @@ "pid": "0x0180", "device_version": "1.0.0" }, + "matrix_pins": { + "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], + "rows": ["B4", "B3", "A15", "A14", "A13"] + }, + "diode_direction": "ROW2COL", "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/q8/ansi_encoder/ansi_encoder.h b/keyboards/keychron/q8/ansi_encoder/ansi_encoder.h deleted file mode 100644 index db52563dc4..0000000000 --- a/keyboards/keychron/q8/ansi_encoder/ansi_encoder.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2021 @ Keychron (https://www.keychron.com) - * - * 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" diff --git a/keyboards/keychron/q8/ansi_encoder/info.json b/keyboards/keychron/q8/ansi_encoder/info.json index b75a878198..071a7a25f9 100644 --- a/keyboards/keychron/q8/ansi_encoder/info.json +++ b/keyboards/keychron/q8/ansi_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0181", "device_version": "1.0.0" }, + "matrix_pins": { + "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], + "rows": ["B4", "B3", "A15", "A14", "A13"] + }, + "diode_direction": "ROW2COL", "encoder": { "rotary": [ {"pin_a": "B5", "pin_b": "A10"} diff --git a/keyboards/keychron/q8/config.h b/keyboards/keychron/q8/config.h index 017f463d84..e0f6c673a5 100644 --- a/keyboards/keychron/q8/config.h +++ b/keyboards/keychron/q8/config.h @@ -16,15 +16,6 @@ #pragma once -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION ROW2COL - -/* Key matrix pins */ -#define MATRIX_ROW_PINS \ - { B4, B3, A15, A14, A13 } -#define MATRIX_COL_PINS \ - { C14, C15, A0, A1, A2, A3, A4, A5, A6, A7, B0, B1, A8, A9, H3 } - /* If PH3 used with a stronger pull resistor then the following definition needs be included */ // #define MATRIX_UNSELECT_DRIVE_HIGH diff --git a/keyboards/keychron/q8/iso/info.json b/keyboards/keychron/q8/iso/info.json index c5a5b7653e..e716b347a0 100644 --- a/keyboards/keychron/q8/iso/info.json +++ b/keyboards/keychron/q8/iso/info.json @@ -8,6 +8,11 @@ "pid": "0x0182", "device_version": "1.0.0" }, + "matrix_pins": { + "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], + "rows": ["B4", "B3", "A15", "A14", "A13"] + }, + "diode_direction": "ROW2COL", "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/q8/iso/iso.h b/keyboards/keychron/q8/iso/iso.h deleted file mode 100644 index db52563dc4..0000000000 --- a/keyboards/keychron/q8/iso/iso.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2021 @ Keychron (https://www.keychron.com) - * - * 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" diff --git a/keyboards/keychron/q8/iso_encoder/info.json b/keyboards/keychron/q8/iso_encoder/info.json index 45181452be..f70548f3c4 100644 --- a/keyboards/keychron/q8/iso_encoder/info.json +++ b/keyboards/keychron/q8/iso_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0183", "device_version": "1.0.0" }, + "matrix_pins": { + "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], + "rows": ["B4", "B3", "A15", "A14", "A13"] + }, + "diode_direction": "ROW2COL", "encoder": { "rotary": [ {"pin_a": "B5", "pin_b": "A10"} diff --git a/keyboards/keychron/q8/iso_encoder/iso_encoder.h b/keyboards/keychron/q8/iso_encoder/iso_encoder.h deleted file mode 100644 index db52563dc4..0000000000 --- a/keyboards/keychron/q8/iso_encoder/iso_encoder.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2021 @ Keychron (https://www.keychron.com) - * - * 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" diff --git a/keyboards/keychron/q8/q8.c b/keyboards/keychron/q8/q8.c index d86ced3d1b..a653bdc8b9 100644 --- a/keyboards/keychron/q8/q8.c +++ b/keyboards/keychron/q8/q8.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "q8.h" +#include "quantum.h" const matrix_row_t matrix_mask[] = { 0b111111111111111, diff --git a/keyboards/keychron/q8/q8.h b/keyboards/keychron/q8/q8.h deleted file mode 100644 index 02981db19c..0000000000 --- a/keyboards/keychron/q8/q8.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright 2021 @ Keychron (https://www.keychron.com) - * - * 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" - -#if defined(KEYBOARD_keychron_q8_ansi) -# include "ansi.h" -#elif defined(KEYBOARD_keychron_q8_ansi_encoder) -# include "ansi_encoder.h" -#elif defined(KEYBOARD_keychron_q8_iso) -# include "iso.h" -#elif defined(KEYBOARD_keychron_q8_iso_encoder) -# include "iso_encoder.h" -#endif diff --git a/keyboards/keychron/q9/ansi/ansi.c b/keyboards/keychron/q9/ansi/ansi.c index e10c4de25b..b98149a5f8 100644 --- a/keyboards/keychron/q9/ansi/ansi.c +++ b/keyboards/keychron/q9/ansi/ansi.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ansi.h" +#include "quantum.h" #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/q9/ansi/ansi.h b/keyboards/keychron/q9/ansi/ansi.h deleted file mode 100644 index db52563dc4..0000000000 --- a/keyboards/keychron/q9/ansi/ansi.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2021 @ Keychron (https://www.keychron.com) - * - * 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" diff --git a/keyboards/keychron/q9/ansi/info.json b/keyboards/keychron/q9/ansi/info.json index e1a6ae534d..cd971b155a 100644 --- a/keyboards/keychron/q9/ansi/info.json +++ b/keyboards/keychron/q9/ansi/info.json @@ -8,6 +8,11 @@ "pid": "0x0190", "device_version": "1.0.0" }, + "matrix_pins": { + "cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14"], + "rows": ["B3", "A15", "A14", "A13"] + }, + "diode_direction": "ROW2COL", "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/q9/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q9/ansi_encoder/ansi_encoder.c index 24c401473d..de0eda1c02 100644 --- a/keyboards/keychron/q9/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/q9/ansi_encoder/ansi_encoder.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ansi_encoder.h" +#include "quantum.h" #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/q9/ansi_encoder/ansi_encoder.h b/keyboards/keychron/q9/ansi_encoder/ansi_encoder.h deleted file mode 100644 index 366d3f39c2..0000000000 --- a/keyboards/keychron/q9/ansi_encoder/ansi_encoder.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 1010 @ Keychron (https://www.keychron.com) - * - * 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 1 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" diff --git a/keyboards/keychron/q9/ansi_encoder/info.json b/keyboards/keychron/q9/ansi_encoder/info.json index 5100c18945..7b4e73eee3 100644 --- a/keyboards/keychron/q9/ansi_encoder/info.json +++ b/keyboards/keychron/q9/ansi_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0191", "device_version": "1.0.0" }, + "matrix_pins": { + "cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14"], + "rows": ["B3", "A15", "A14", "A13"] + }, + "diode_direction": "ROW2COL", "encoder": { "rotary": [ {"pin_a": "B4", "pin_b": "B5"} diff --git a/keyboards/keychron/q9/config.h b/keyboards/keychron/q9/config.h index e051703d11..742dde3ff2 100644 --- a/keyboards/keychron/q9/config.h +++ b/keyboards/keychron/q9/config.h @@ -16,15 +16,6 @@ #pragma once -/* key matrix pins */ -#define MATRIX_ROW_PINS \ - { B3, A15, A14, A13 } -#define MATRIX_COL_PINS \ - { A10, A9, A8, B1, B0, A7, A6, A5, A4, A3, A2, A1, A0, C15, C14 } - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION ROW2COL - /* Disable DIP switch in matrix data */ #define MATRIX_MASKED diff --git a/keyboards/keychron/q9/iso/info.json b/keyboards/keychron/q9/iso/info.json index 159abc63ae..7f435a2b7b 100644 --- a/keyboards/keychron/q9/iso/info.json +++ b/keyboards/keychron/q9/iso/info.json @@ -8,6 +8,11 @@ "pid": "0x0192", "device_version": "1.0.0" }, + "matrix_pins": { + "cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14"], + "rows": ["B3", "A15", "A14", "A13"] + }, + "diode_direction": "ROW2COL", "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/q9/iso/iso.c b/keyboards/keychron/q9/iso/iso.c index e038e8581f..0e258e8c63 100644 --- a/keyboards/keychron/q9/iso/iso.c +++ b/keyboards/keychron/q9/iso/iso.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "iso.h" +#include "quantum.h" #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/q9/iso/iso.h b/keyboards/keychron/q9/iso/iso.h deleted file mode 100644 index db52563dc4..0000000000 --- a/keyboards/keychron/q9/iso/iso.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2021 @ Keychron (https://www.keychron.com) - * - * 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" diff --git a/keyboards/keychron/q9/iso_encoder/info.json b/keyboards/keychron/q9/iso_encoder/info.json index dee0a8953a..8ecb23b0a3 100644 --- a/keyboards/keychron/q9/iso_encoder/info.json +++ b/keyboards/keychron/q9/iso_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0193", "device_version": "1.0.0" }, + "matrix_pins": { + "cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14"], + "rows": ["B3", "A15", "A14", "A13"] + }, + "diode_direction": "ROW2COL", "encoder": { "rotary": [ {"pin_a": "B4", "pin_b": "B5"} diff --git a/keyboards/keychron/q9/iso_encoder/iso_encoder.c b/keyboards/keychron/q9/iso_encoder/iso_encoder.c index 7f6db9a128..0804f33671 100644 --- a/keyboards/keychron/q9/iso_encoder/iso_encoder.c +++ b/keyboards/keychron/q9/iso_encoder/iso_encoder.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "iso_encoder.h" +#include "quantum.h" #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/q9/iso_encoder/iso_encoder.h b/keyboards/keychron/q9/iso_encoder/iso_encoder.h deleted file mode 100644 index 366d3f39c2..0000000000 --- a/keyboards/keychron/q9/iso_encoder/iso_encoder.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 1010 @ Keychron (https://www.keychron.com) - * - * 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 1 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" diff --git a/keyboards/keychron/q9/q9.c b/keyboards/keychron/q9/q9.c index 2f98a72974..51dea886f1 100644 --- a/keyboards/keychron/q9/q9.c +++ b/keyboards/keychron/q9/q9.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "q9.h" +#include "quantum.h" const matrix_row_t matrix_mask[] = { 0b111111111111111, diff --git a/keyboards/keychron/q9/q9.h b/keyboards/keychron/q9/q9.h deleted file mode 100644 index d6a0ef1bea..0000000000 --- a/keyboards/keychron/q9/q9.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright 2022 @ Keychron (https://www.keychron.com) - * - * 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" - -#if defined(KEYBOARD_keychron_q9_ansi) -# include "ansi.h" -#elif defined(KEYBOARD_keychron_q9_ansi_encoder) -# include "ansi_encoder.h" -#elif defined(KEYBOARD_keychron_q9_iso) -# include "iso.h" -#elif defined(KEYBOARD_keychron_q9_iso_encoder) -# include "iso_encoder.h" -#endif diff --git a/keyboards/keychron/s1/ansi/rgb/info.json b/keyboards/keychron/s1/ansi/rgb/info.json index 02ea4d4c90..2aabe622d4 100644 --- a/keyboards/keychron/s1/ansi/rgb/info.json +++ b/keyboards/keychron/s1/ansi/rgb/info.json @@ -8,6 +8,11 @@ "pid": "0x0410", "device_version": "1.0.0" }, + "matrix_pins": { + "cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14"], + "rows": ["B5", "B4", "B3", "A15", "A14", "A13"] + }, + "diode_direction": "ROW2COL", "processor": "STM32L432", "bootloader": "stm32-dfu", "layout_aliases": { diff --git a/keyboards/keychron/s1/ansi/white/info.json b/keyboards/keychron/s1/ansi/white/info.json index a64f5eb0a9..e6c0e4f3d1 100644 --- a/keyboards/keychron/s1/ansi/white/info.json +++ b/keyboards/keychron/s1/ansi/white/info.json @@ -8,6 +8,11 @@ "pid": "0x0411", "device_version": "1.0.0" }, + "matrix_pins": { + "cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14"], + "rows": ["B5", "B4", "B3", "A15", "A14", "A13"] + }, + "diode_direction": "ROW2COL", "processor": "STM32L432", "bootloader": "stm32-dfu", "layout_aliases": { diff --git a/keyboards/keychron/s1/config.h b/keyboards/keychron/s1/config.h index e12cc0479c..8c98389522 100644 --- a/keyboards/keychron/s1/config.h +++ b/keyboards/keychron/s1/config.h @@ -16,15 +16,6 @@ #pragma once -/* key matrix pins */ -#define MATRIX_ROW_PINS \ - { B5, B4, B3, A15, A14, A13 } -#define MATRIX_COL_PINS \ - { A10, A9, A8, B1, B0, A7, A6, A5, A4, A3, A2, A1, A0, C15, C14 } - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION ROW2COL - /* Disable DIP switch in matrix data */ #define MATRIX_MASKED diff --git a/keyboards/keychron/v10/v10.c b/keyboards/keychron/v10/v10.c index 091c2e9a4b..2e1e3f090f 100644 --- a/keyboards/keychron/v10/v10.c +++ b/keyboards/keychron/v10/v10.c @@ -84,17 +84,3 @@ bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { } #endif // CAPS_LOCK_LED_INDEX - -#ifdef ENCODER_ENABLE -bool encoder_update_kb(uint8_t index, bool clockwise) { - if (!encoder_update_user(index, clockwise)) { return false; } - if (index == 0) { - if (clockwise) { - tap_code_delay(KC_VOLU, 10); - } else { - tap_code_delay(KC_VOLD, 10); - } - } - return true; -} -#endif diff --git a/keyboards/keychron/v2/ansi/info.json b/keyboards/keychron/v2/ansi/info.json index f0bb49cee2..9c8bffb4f1 100644 --- a/keyboards/keychron/v2/ansi/info.json +++ b/keyboards/keychron/v2/ansi/info.json @@ -8,6 +8,11 @@ "pid": "0x0320", "device_version": "1.0.0" }, + "matrix_pins": { + "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], + "rows": ["B4", "B3", "A15", "A14", "A13"] + }, + "diode_direction": "ROW2COL", "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/v2/ansi_encoder/info.json b/keyboards/keychron/v2/ansi_encoder/info.json index 1e729eb636..3a8f9add34 100644 --- a/keyboards/keychron/v2/ansi_encoder/info.json +++ b/keyboards/keychron/v2/ansi_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0321", "device_version": "1.0.0" }, + "matrix_pins": { + "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], + "rows": ["B4", "B3", "A15", "A14", "A13"] + }, + "diode_direction": "ROW2COL", "encoder": { "rotary": [ {"pin_a": "A10", "pin_b": "B5"} diff --git a/keyboards/keychron/v2/config.h b/keyboards/keychron/v2/config.h index 4cb2721911..08cc5b8e84 100644 --- a/keyboards/keychron/v2/config.h +++ b/keyboards/keychron/v2/config.h @@ -16,15 +16,6 @@ #pragma once -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION ROW2COL - -/* key matrix pins */ -#define MATRIX_ROW_PINS \ - { B4, B3, A15, A14, A13 } -#define MATRIX_COL_PINS \ - { C14, C15, A0, A1, A2, A3, A4, A5, A6, A7, B0, B1, A8, A9, H3 } - /* If uses PH3 with a stronger pull resistor then the following definition should be included */ // #define MATRIX_UNSELECT_DRIVE_HIGH diff --git a/keyboards/keychron/v2/iso/info.json b/keyboards/keychron/v2/iso/info.json index 0679e1737c..9a79f31149 100644 --- a/keyboards/keychron/v2/iso/info.json +++ b/keyboards/keychron/v2/iso/info.json @@ -8,6 +8,11 @@ "pid": "0x0322", "device_version": "1.0.0" }, + "matrix_pins": { + "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], + "rows": ["B4", "B3", "A15", "A14", "A13"] + }, + "diode_direction": "ROW2COL", "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/v2/iso_encoder/info.json b/keyboards/keychron/v2/iso_encoder/info.json index a784b33ec5..13a232c6da 100644 --- a/keyboards/keychron/v2/iso_encoder/info.json +++ b/keyboards/keychron/v2/iso_encoder/info.json @@ -7,6 +7,11 @@ "pid": "0x0323", "device_version": "1.0.0" }, + "matrix_pins": { + "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], + "rows": ["B4", "B3", "A15", "A14", "A13"] + }, + "diode_direction": "ROW2COL", "encoder": { "rotary": [ {"pin_a": "A10", "pin_b": "B5"} diff --git a/keyboards/keychron/v2/jis/info.json b/keyboards/keychron/v2/jis/info.json index 89ec07b072..a727490f8f 100644 --- a/keyboards/keychron/v2/jis/info.json +++ b/keyboards/keychron/v2/jis/info.json @@ -8,6 +8,11 @@ "pid": "0x0324", "device_version": "1.0.0" }, + "matrix_pins": { + "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], + "rows": ["B4", "B3", "A15", "A14", "A13"] + }, + "diode_direction": "ROW2COL", "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/v2/jis_encoder/info.json b/keyboards/keychron/v2/jis_encoder/info.json index abb76636f7..222861041c 100644 --- a/keyboards/keychron/v2/jis_encoder/info.json +++ b/keyboards/keychron/v2/jis_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0325", "device_version": "1.0.0" }, + "matrix_pins": { + "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], + "rows": ["B4", "B3", "A15", "A14", "A13"] + }, + "diode_direction": "ROW2COL", "encoder": { "rotary": [ {"pin_a": "A10", "pin_b": "B5"} diff --git a/keyboards/keychron/v4/ansi/info.json b/keyboards/keychron/v4/ansi/info.json index 04bd9e4761..372f8d2bf0 100644 --- a/keyboards/keychron/v4/ansi/info.json +++ b/keyboards/keychron/v4/ansi/info.json @@ -8,6 +8,11 @@ "pid": "0x0340", "device_version": "1.0.0" }, + "matrix_pins": { + "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9"], + "rows": ["B4", "B3", "A15", "A14", "A13"] + }, + "diode_direction": "ROW2COL", "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/v4/config.h b/keyboards/keychron/v4/config.h index eb22d58fb9..8d92219f20 100644 --- a/keyboards/keychron/v4/config.h +++ b/keyboards/keychron/v4/config.h @@ -16,15 +16,6 @@ #pragma once -/* key matrix pins */ -#define MATRIX_ROW_PINS \ - { B4, B3, A15, A14, A13 } -#define MATRIX_COL_PINS \ - { C14, C15, A0, A1, A2, A3, A4, A5, A6, A7, B0, B1, A8, A9 } - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION ROW2COL - /* RGB Matrix Driver Configuration */ #define DRIVER_COUNT 1 #define DRIVER_ADDR_1 0b1110111 diff --git a/keyboards/keychron/v4/iso/info.json b/keyboards/keychron/v4/iso/info.json index 561fdde3cc..79d23c7853 100644 --- a/keyboards/keychron/v4/iso/info.json +++ b/keyboards/keychron/v4/iso/info.json @@ -8,6 +8,11 @@ "pid": "0x0342", "device_version": "1.0.0" }, + "matrix_pins": { + "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9"], + "rows": ["B4", "B3", "A15", "A14", "A13"] + }, + "diode_direction": "ROW2COL", "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/v6/v6.c b/keyboards/keychron/v6/v6.c index 02708e7bc1..0f9305d2d0 100644 --- a/keyboards/keychron/v6/v6.c +++ b/keyboards/keychron/v6/v6.c @@ -98,17 +98,3 @@ bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { } #endif // RGB_MATRIX_ENABLE... - -#ifdef ENCODER_ENABLE -bool encoder_update_kb(uint8_t index, bool clockwise) { - if (!encoder_update_user(index, clockwise)) { return false; } - if (index == 0) { - if (clockwise) { - tap_code_delay(KC_VOLU, 10); - } else { - tap_code_delay(KC_VOLD, 10); - } - } - return true; -} -#endif diff --git a/keyboards/keychron/v7/ansi/info.json b/keyboards/keychron/v7/ansi/info.json index 00df236f6d..7b3eb8db78 100644 --- a/keyboards/keychron/v7/ansi/info.json +++ b/keyboards/keychron/v7/ansi/info.json @@ -8,6 +8,11 @@ "pid": "0x0370", "device_version": "1.0.0" }, + "matrix_pins": { + "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "A10", "B5"], + "rows": ["B4", "B3", "A15", "A14", "A13"] + }, + "diode_direction": "ROW2COL", "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/v7/config.h b/keyboards/keychron/v7/config.h index b6a08098ce..c439a7e366 100644 --- a/keyboards/keychron/v7/config.h +++ b/keyboards/keychron/v7/config.h @@ -16,15 +16,6 @@ #pragma once -/* key matrix pins */ -#define MATRIX_ROW_PINS \ - { B4, B3, A15, A14, A13 } -#define MATRIX_COL_PINS \ - { C14, C15, A0, A1, A2, A3, A4, A5, A6, A7, B0, B1, A8, A9, A10, B5 } - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION ROW2COL - /* RGB Matrix Driver Configuration */ #define DRIVER_COUNT 2 #define DRIVER_ADDR_1 0b1110111 diff --git a/keyboards/keychron/v7/iso/info.json b/keyboards/keychron/v7/iso/info.json index e01b12464c..449ec89487 100644 --- a/keyboards/keychron/v7/iso/info.json +++ b/keyboards/keychron/v7/iso/info.json @@ -8,6 +8,11 @@ "pid": "0x0372", "device_version": "1.0.0" }, + "matrix_pins": { + "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "A10", "B5"], + "rows": ["B4", "B3", "A15", "A14", "A13"] + }, + "diode_direction": "ROW2COL", "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/v8/ansi/info.json b/keyboards/keychron/v8/ansi/info.json index f1f2e75e4d..6924af28b5 100644 --- a/keyboards/keychron/v8/ansi/info.json +++ b/keyboards/keychron/v8/ansi/info.json @@ -8,6 +8,11 @@ "pid": "0x0380", "device_version": "1.0.0" }, + "matrix_pins": { + "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], + "rows": ["B4", "B3", "A15", "A14", "A13"] + }, + "diode_direction": "ROW2COL", "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/v8/ansi_encoder/info.json b/keyboards/keychron/v8/ansi_encoder/info.json index f6a9de655b..8ff94cedb0 100644 --- a/keyboards/keychron/v8/ansi_encoder/info.json +++ b/keyboards/keychron/v8/ansi_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0381", "device_version": "1.0.0" }, + "matrix_pins": { + "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], + "rows": ["B4", "B3", "A15", "A14", "A13"] + }, + "diode_direction": "ROW2COL", "encoder": { "rotary": [ {"pin_a": "A10", "pin_b": "B5"} diff --git a/keyboards/keychron/v8/config.h b/keyboards/keychron/v8/config.h index c5a3857f40..7c6076e199 100644 --- a/keyboards/keychron/v8/config.h +++ b/keyboards/keychron/v8/config.h @@ -16,13 +16,6 @@ #pragma once -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION ROW2COL - -/* Key matrix pins */ -#define MATRIX_ROW_PINS { B4, B3, A15, A14, A13 } -#define MATRIX_COL_PINS { C14, C15, A0, A1, A2, A3, A4, A5, A6, A7, B0, B1, A8, A9, H3 } - /* If uses PH3 with a stronger pull resistor then the following definition should be included */ // #define MATRIX_UNSELECT_DRIVE_HIGH diff --git a/keyboards/keychron/v8/iso/info.json b/keyboards/keychron/v8/iso/info.json index 22b363d072..1cfb662ba2 100644 --- a/keyboards/keychron/v8/iso/info.json +++ b/keyboards/keychron/v8/iso/info.json @@ -8,6 +8,11 @@ "pid": "0x0382", "device_version": "1.0.0" }, + "matrix_pins": { + "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], + "rows": ["B4", "B3", "A15", "A14", "A13"] + }, + "diode_direction": "ROW2COL", "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/keychron/v8/iso_encoder/info.json b/keyboards/keychron/v8/iso_encoder/info.json index 2abaeda111..a70cc2c43b 100644 --- a/keyboards/keychron/v8/iso_encoder/info.json +++ b/keyboards/keychron/v8/iso_encoder/info.json @@ -8,6 +8,11 @@ "pid": "0x0383", "device_version": "1.0.0" }, + "matrix_pins": { + "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], + "rows": ["B4", "B3", "A15", "A14", "A13"] + }, + "diode_direction": "ROW2COL", "encoder": { "rotary": [ {"pin_a": "A10", "pin_b": "B5"} |