Move Keychron Q0 and Q0 Plus data-driven configuration; keychron keymap rules.mk cleanup (#20168)

Co-authored-by: Nick Brassel <nick@tzarc.org>
This commit is contained in:
adophoxia 2023-04-03 20:26:54 -07:00 committed by GitHub
parent c224cb9605
commit 147d397e34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 145 additions and 156 deletions

View file

@ -18,9 +18,6 @@
#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
@ -28,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

View file

@ -24,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

View file

@ -6,15 +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": [

View file

@ -1,5 +1,4 @@
VIA_ENABLE = yes
ENCODER_MAP_ENABLE = yes
VPATH += keyboards/keychron/common
SRC += keychron_common.c

View file

@ -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

View file

@ -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

View file

@ -6,12 +6,26 @@
"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": [
@ -23,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": [

View file

@ -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

View file

@ -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