diff options
author | lalalademaxiya1 <66767061+lalalademaxiya1@users.noreply.github.com> | 2022-09-30 00:50:47 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-29 17:50:47 +0100 |
commit | bfcbcfe3c7efad948a026ad8c365007bb82d9b6a (patch) | |
tree | f42706402b89f136b87a38b31c372ad09f92056e /keyboards | |
parent | 14e18864056f836f359258521d63ddf7597d0dd7 (diff) |
Update q0 for keychron (#18522)
Diffstat (limited to 'keyboards')
-rw-r--r-- | keyboards/keychron/q0/config.h | 10 | ||||
-rw-r--r-- | keyboards/keychron/q0/q0.c | 8 | ||||
-rw-r--r-- | keyboards/keychron/q0/rev_0130/rev_0130.c | 14 |
3 files changed, 17 insertions, 15 deletions
diff --git a/keyboards/keychron/q0/config.h b/keyboards/keychron/q0/config.h index 40f506fe80..a04d31d3a2 100644 --- a/keyboards/keychron/q0/config.h +++ b/keyboards/keychron/q0/config.h @@ -34,18 +34,18 @@ #define DRIVER_COUNT 1 #define DRIVER_ADDR_1 0b1110100 -#define CONSTANT_CURRENT_STEP \ +#define CKLED2001_CURRENT_TUNE \ { 0xFF, 0xFF, 0x70, 0xFF, 0xFF, 0x70, 0xFF, 0xFF, 0x70, 0xFF, 0xFF, 0x70 } +#define RGB_MATRIX_CENTER \ + { 56, 16 } + /* NKRO */ #define FORCE_NKRO /* turn off effects when suspended */ #define RGB_DISABLE_WHEN_USB_SUSPENDED -/* We have 2KB EEPROM size on STM32L432 */ -#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 2047 - /* EEPROM Driver Configuration */ #define WEAR_LEVELING_LOGICAL_SIZE 2048 #define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2) @@ -98,4 +98,4 @@ #define ENABLE_RGB_MATRIX_MULTISPLASH #define ENABLE_RGB_MATRIX_SOLID_SPLASH #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH -// #define RGB_MATRIX_KEYPRESSES
\ No newline at end of file +// #define RGB_MATRIX_KEYPRESSES diff --git a/keyboards/keychron/q0/q0.c b/keyboards/keychron/q0/q0.c index c43157ac68..d17ab77f47 100644 --- a/keyboards/keychron/q0/q0.c +++ b/keyboards/keychron/q0/q0.c @@ -16,7 +16,7 @@ #include "q0.h" -#if defined(RGB_MATRIX_ENABLE) && defined(CAPS_LOCK_LED_INDEX) +#if defined(RGB_MATRIX_ENABLE) && defined(NUM_LOCK_LED_INDEX) bool process_record_kb(uint16_t keycode, keyrecord_t *record) { if (!process_record_user(keycode, record)) { @@ -45,11 +45,11 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { __attribute__((weak)) void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { // RGB_MATRIX_INDICATOR_SET_COLOR(index, red, green, blue); - if (host_keyboard_led_state().caps_lock) { - RGB_MATRIX_INDICATOR_SET_COLOR(CAPS_LOCK_LED_INDEX, 255, 255, 255); + if (host_keyboard_led_state().num_lock) { + RGB_MATRIX_INDICATOR_SET_COLOR(NUM_LOCK_LED_INDEX, 255, 255, 255); } else { if (!rgb_matrix_get_flags()) { - RGB_MATRIX_INDICATOR_SET_COLOR(CAPS_LOCK_LED_INDEX, 0, 0, 0); + RGB_MATRIX_INDICATOR_SET_COLOR(NUM_LOCK_LED_INDEX, 0, 0, 0); } } } diff --git a/keyboards/keychron/q0/rev_0130/rev_0130.c b/keyboards/keychron/q0/rev_0130/rev_0130.c index 468e3cf04f..64c4842086 100644 --- a/keyboards/keychron/q0/rev_0130/rev_0130.c +++ b/keyboards/keychron/q0/rev_0130/rev_0130.c @@ -18,6 +18,8 @@ #ifdef RGB_MATRIX_ENABLE +// clang-format off + const ckled2001_led PROGMEM g_ckled2001_leds[DRIVER_LED_TOTAL] = { /* Refer to CKLED manual for these locations * driver @@ -67,12 +69,12 @@ led_config_t g_led_config = { }, { // LED Index to Physical Position - {0,0}, {74,0}, {150,0}, {224,0}, - {0,13}, {74,13}, {150,13}, {224,13}, - {0,26}, {74,26}, {150,26}, - {0,38}, {74,38}, {150,38}, {224,32}, - {0,51}, {74,51}, {150,51}, - {36,64}, {150,64}, {224,58}, + {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 |