diff options
| author | Ryan <fauxpark@gmail.com> | 2023-10-04 20:10:05 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-04 20:10:05 +1100 |
| commit | c0f16be50fec33cdb30386ac512efb900f3f7470 (patch) | |
| tree | 93bb5024f5ff32f81e86d3bf4ea4ff243e239c35 | |
| parent | 24a795d7a96722239be3a969201200602208aeb2 (diff) | |
Rename CKLED2001 driver to SNLED27351 (#22071)
259 files changed, 1726 insertions, 1720 deletions
diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index 5ac392c6a9..d08b3751fc 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk | |||
| @@ -352,9 +352,12 @@ endif | |||
| 352 | ifeq ($(strip $(LED_MATRIX_DRIVER)), aw20216) | 352 | ifeq ($(strip $(LED_MATRIX_DRIVER)), aw20216) |
| 353 | LED_MATRIX_DRIVER := aw20216s | 353 | LED_MATRIX_DRIVER := aw20216s |
| 354 | endif | 354 | endif |
| 355 | ifeq ($(strip $(LED_MATRIX_DRIVER)), ckled2001) | ||
| 356 | LED_MATRIX_DRIVER := snled27351 | ||
| 357 | endif | ||
| 355 | 358 | ||
| 356 | LED_MATRIX_ENABLE ?= no | 359 | LED_MATRIX_ENABLE ?= no |
| 357 | VALID_LED_MATRIX_TYPES := is31fl3218 is31fl3731 is31fl3733 is31fl3736 is31fl3737 is31fl3741 is31fl3742a is31fl3743a is31fl3745 is31fl3746a ckled2001 custom | 360 | VALID_LED_MATRIX_TYPES := is31fl3218 is31fl3731 is31fl3733 is31fl3736 is31fl3737 is31fl3741 is31fl3742a is31fl3743a is31fl3745 is31fl3746a snled27351 custom |
| 358 | 361 | ||
| 359 | ifeq ($(strip $(LED_MATRIX_ENABLE)), yes) | 362 | ifeq ($(strip $(LED_MATRIX_ENABLE)), yes) |
| 360 | ifeq ($(filter $(LED_MATRIX_DRIVER),$(VALID_LED_MATRIX_TYPES)),) | 363 | ifeq ($(filter $(LED_MATRIX_DRIVER),$(VALID_LED_MATRIX_TYPES)),) |
| @@ -446,10 +449,10 @@ endif | |||
| 446 | QUANTUM_LIB_SRC += i2c_master.c | 449 | QUANTUM_LIB_SRC += i2c_master.c |
| 447 | endif | 450 | endif |
| 448 | 451 | ||
| 449 | ifeq ($(strip $(LED_MATRIX_DRIVER)), ckled2001) | 452 | ifeq ($(strip $(LED_MATRIX_DRIVER)), snled27351) |
| 450 | OPT_DEFS += -DHAL_USE_I2C=TRUE | 453 | OPT_DEFS += -DHAL_USE_I2C=TRUE |
| 451 | COMMON_VPATH += $(DRIVER_PATH)/led | 454 | COMMON_VPATH += $(DRIVER_PATH)/led |
| 452 | SRC += ckled2001-simple.c | 455 | SRC += snled27351-simple.c |
| 453 | QUANTUM_LIB_SRC += i2c_master.c | 456 | QUANTUM_LIB_SRC += i2c_master.c |
| 454 | endif | 457 | endif |
| 455 | 458 | ||
| @@ -459,10 +462,13 @@ endif | |||
| 459 | ifeq ($(strip $(RGB_MATRIX_DRIVER)), aw20216) | 462 | ifeq ($(strip $(RGB_MATRIX_DRIVER)), aw20216) |
| 460 | RGB_MATRIX_DRIVER := aw20216s | 463 | RGB_MATRIX_DRIVER := aw20216s |
| 461 | endif | 464 | endif |
| 465 | ifeq ($(strip $(RGB_MATRIX_DRIVER)), ckled2001) | ||
| 466 | RGB_MATRIX_DRIVER := snled27351 | ||
| 467 | endif | ||
| 462 | 468 | ||
| 463 | RGB_MATRIX_ENABLE ?= no | 469 | RGB_MATRIX_ENABLE ?= no |
| 464 | 470 | ||
| 465 | VALID_RGB_MATRIX_TYPES := aw20216s is31fl3218 is31fl3731 is31fl3733 is31fl3736 is31fl3737 is31fl3741 is31fl3742a is31fl3743a is31fl3745 is31fl3746a ckled2001 ws2812 custom | 471 | VALID_RGB_MATRIX_TYPES := aw20216s is31fl3218 is31fl3731 is31fl3733 is31fl3736 is31fl3737 is31fl3741 is31fl3742a is31fl3743a is31fl3745 is31fl3746a snled27351 ws2812 custom |
| 466 | ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes) | 472 | ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes) |
| 467 | ifeq ($(filter $(RGB_MATRIX_DRIVER),$(VALID_RGB_MATRIX_TYPES)),) | 473 | ifeq ($(filter $(RGB_MATRIX_DRIVER),$(VALID_RGB_MATRIX_TYPES)),) |
| 468 | $(call CATASTROPHIC_ERROR,Invalid RGB_MATRIX_DRIVER,RGB_MATRIX_DRIVER="$(RGB_MATRIX_DRIVER)" is not a valid matrix type) | 474 | $(call CATASTROPHIC_ERROR,Invalid RGB_MATRIX_DRIVER,RGB_MATRIX_DRIVER="$(RGB_MATRIX_DRIVER)" is not a valid matrix type) |
| @@ -561,10 +567,10 @@ endif | |||
| 561 | QUANTUM_LIB_SRC += i2c_master.c | 567 | QUANTUM_LIB_SRC += i2c_master.c |
| 562 | endif | 568 | endif |
| 563 | 569 | ||
| 564 | ifeq ($(strip $(RGB_MATRIX_DRIVER)), ckled2001) | 570 | ifeq ($(strip $(RGB_MATRIX_DRIVER)), snled27351) |
| 565 | OPT_DEFS += -DHAL_USE_I2C=TRUE | 571 | OPT_DEFS += -DHAL_USE_I2C=TRUE |
| 566 | COMMON_VPATH += $(DRIVER_PATH)/led | 572 | COMMON_VPATH += $(DRIVER_PATH)/led |
| 567 | SRC += ckled2001.c | 573 | SRC += snled27351.c |
| 568 | QUANTUM_LIB_SRC += i2c_master.c | 574 | QUANTUM_LIB_SRC += i2c_master.c |
| 569 | endif | 575 | endif |
| 570 | 576 | ||
diff --git a/docs/reference_info_json.md b/docs/reference_info_json.md index 7e5f11b7a7..f31d3c4a2f 100644 --- a/docs/reference_info_json.md +++ b/docs/reference_info_json.md | |||
| @@ -329,7 +329,7 @@ Configures the [LED Matrix](feature_led_matrix.md) feature. | |||
| 329 | * The centroid (geometric center) of the LEDs. Used for certain effects. | 329 | * The centroid (geometric center) of the LEDs. Used for certain effects. |
| 330 | * Default: `[112, 32]` | 330 | * Default: `[112, 32]` |
| 331 | * `driver` (Required) | 331 | * `driver` (Required) |
| 332 | * The driver to use. Must be one of `ckled2001`, `custom`, `is31fl3218`, `is31fl3731`, `is31fl3733`, `is31fl3736`, `is31fl3737`, `is31fl3741`, `is31fl3742a`, `is31fl3743a`, `is31fl3745`, `is31fl3746a`. | 332 | * The driver to use. Must be one of `custom`, `is31fl3218`, `is31fl3731`, `is31fl3733`, `is31fl3736`, `is31fl3737`, `is31fl3741`, `is31fl3742a`, `is31fl3743a`, `is31fl3745`, `is31fl3746a`, `snled27351`. |
| 333 | * `layout` (Required) | 333 | * `layout` (Required) |
| 334 | * List of LED configuration dictionaries. Each dictionary contains: | 334 | * List of LED configuration dictionaries. Each dictionary contains: |
| 335 | * `flags` (Required) | 335 | * `flags` (Required) |
| @@ -542,7 +542,7 @@ Configures the [RGB Matrix](feature_rgb_matrix.md) feature. | |||
| 542 | * The centroid (geometric center) of the LEDs. Used for certain effects. | 542 | * The centroid (geometric center) of the LEDs. Used for certain effects. |
| 543 | * Default: `[112, 32]` | 543 | * Default: `[112, 32]` |
| 544 | * `driver` (Required) | 544 | * `driver` (Required) |
| 545 | * The driver to use. Must be one of `aw20216s`, `ckled2001`, `custom`, `is31fl3218`, `is31fl3731`, `is31fl3733`, `is31fl3736`, `is31fl3737`, `is31fl3741`, `is31fl3742a`, `is31fl3743a`, `is31fl3745`, `is31fl3746a`, `ws2812`. | 545 | * The driver to use. Must be one of `aw20216s`, `custom`, `is31fl3218`, `is31fl3731`, `is31fl3733`, `is31fl3736`, `is31fl3737`, `is31fl3741`, `is31fl3742a`, `is31fl3743a`, `is31fl3745`, `is31fl3746a`, `snled27351`, `ws2812`. |
| 546 | * `hue_steps` | 546 | * `hue_steps` |
| 547 | * The number of hue adjustment steps. | 547 | * The number of hue adjustment steps. |
| 548 | * Default: `8` | 548 | * Default: `8` |
diff --git a/drivers/led/ckled2001-simple.c b/drivers/led/ckled2001-simple.c deleted file mode 100644 index 936b915af8..0000000000 --- a/drivers/led/ckled2001-simple.c +++ /dev/null | |||
| @@ -1,220 +0,0 @@ | |||
| 1 | /* Copyright 2021 @ Keychron (https://www.keychron.com) | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include "ckled2001-simple.h" | ||
| 18 | #include "i2c_master.h" | ||
| 19 | |||
| 20 | #ifndef CKLED2001_I2C_TIMEOUT | ||
| 21 | # define CKLED2001_I2C_TIMEOUT 100 | ||
| 22 | #endif | ||
| 23 | |||
| 24 | #ifndef CKLED2001_I2C_PERSISTENCE | ||
| 25 | # define CKLED2001_I2C_PERSISTENCE 0 | ||
| 26 | #endif | ||
| 27 | |||
| 28 | #ifndef CKLED2001_PHASE_CHANNEL | ||
| 29 | # define CKLED2001_PHASE_CHANNEL CKLED2001_MSKPHASE_12CHANNEL | ||
| 30 | #endif | ||
| 31 | |||
| 32 | #ifndef CKLED2001_CURRENT_TUNE | ||
| 33 | # define CKLED2001_CURRENT_TUNE \ | ||
| 34 | { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF } | ||
| 35 | #endif | ||
| 36 | |||
| 37 | // Transfer buffer for TWITransmitData() | ||
| 38 | uint8_t g_twi_transfer_buffer[20]; | ||
| 39 | |||
| 40 | // These buffers match the CKLED2001 PWM registers. | ||
| 41 | // The control buffers match the PG0 LED On/Off registers. | ||
| 42 | // Storing them like this is optimal for I2C transfers to the registers. | ||
| 43 | // We could optimize this and take out the unused registers from these | ||
| 44 | // buffers and the transfers in ckled2001_write_pwm_buffer() but it's | ||
| 45 | // probably not worth the extra complexity. | ||
| 46 | uint8_t g_pwm_buffer[CKLED2001_DRIVER_COUNT][192]; | ||
| 47 | bool g_pwm_buffer_update_required[CKLED2001_DRIVER_COUNT] = {false}; | ||
| 48 | |||
| 49 | uint8_t g_led_control_registers[CKLED2001_DRIVER_COUNT][24] = {0}; | ||
| 50 | bool g_led_control_registers_update_required[CKLED2001_DRIVER_COUNT] = {false}; | ||
| 51 | |||
| 52 | bool ckled2001_write_register(uint8_t addr, uint8_t reg, uint8_t data) { | ||
| 53 | // If the transaction fails function returns false. | ||
| 54 | g_twi_transfer_buffer[0] = reg; | ||
| 55 | g_twi_transfer_buffer[1] = data; | ||
| 56 | |||
| 57 | #if CKLED2001_I2C_PERSISTENCE > 0 | ||
| 58 | for (uint8_t i = 0; i < CKLED2001_I2C_PERSISTENCE; i++) { | ||
| 59 | if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, CKLED2001_I2C_TIMEOUT) != 0) { | ||
| 60 | return false; | ||
| 61 | } | ||
| 62 | } | ||
| 63 | #else | ||
| 64 | if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, CKLED2001_I2C_TIMEOUT) != 0) { | ||
| 65 | return false; | ||
| 66 | } | ||
| 67 | #endif | ||
| 68 | return true; | ||
| 69 | } | ||
| 70 | |||
| 71 | bool ckled2001_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) { | ||
| 72 | // Assumes PG1 is already selected. | ||
| 73 | // If any of the transactions fails function returns false. | ||
| 74 | // Transmit PWM registers in 12 transfers of 16 bytes. | ||
| 75 | // g_twi_transfer_buffer[] is 20 bytes | ||
| 76 | |||
| 77 | // Iterate over the pwm_buffer contents at 16 byte intervals. | ||
| 78 | for (int i = 0; i < 192; i += 16) { | ||
| 79 | g_twi_transfer_buffer[0] = i; | ||
| 80 | // Copy the data from i to i+15. | ||
| 81 | // Device will auto-increment register for data after the first byte | ||
| 82 | // Thus this sets registers 0x00-0x0F, 0x10-0x1F, etc. in one transfer. | ||
| 83 | for (int j = 0; j < 16; j++) { | ||
| 84 | g_twi_transfer_buffer[1 + j] = pwm_buffer[i + j]; | ||
| 85 | } | ||
| 86 | |||
| 87 | #if CKLED2001_I2C_PERSISTENCE > 0 | ||
| 88 | for (uint8_t i = 0; i < CKLED2001_I2C_PERSISTENCE; i++) { | ||
| 89 | if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, CKLED2001_I2C_TIMEOUT) != 0) { | ||
| 90 | return false; | ||
| 91 | } | ||
| 92 | } | ||
| 93 | #else | ||
| 94 | if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, CKLED2001_I2C_TIMEOUT) != 0) { | ||
| 95 | return false; | ||
| 96 | } | ||
| 97 | #endif | ||
| 98 | } | ||
| 99 | return true; | ||
| 100 | } | ||
| 101 | |||
| 102 | void ckled2001_init(uint8_t addr) { | ||
| 103 | // Select to function page | ||
| 104 | ckled2001_write_register(addr, CKLED2001_REG_CONFIGURE_CMD_PAGE, CKLED2001_FUNCTION_PAGE); | ||
| 105 | // Setting LED driver to shutdown mode | ||
| 106 | ckled2001_write_register(addr, CKLED2001_REG_CONFIGURATION, CKLED2001_MSKSW_SHUT_DOWN_MODE); | ||
| 107 | // Setting internal channel pulldown/pullup | ||
| 108 | ckled2001_write_register(addr, CKLED2001_REG_PDU, CKLED2001_MSKSET_CA_CB_CHANNEL); | ||
| 109 | // Select number of scan phase | ||
| 110 | ckled2001_write_register(addr, CKLED2001_REG_SCAN_PHASE, CKLED2001_PHASE_CHANNEL); | ||
| 111 | // Setting PWM Delay Phase | ||
| 112 | ckled2001_write_register(addr, CKLED2001_REG_SLEW_RATE_CONTROL_MODE1, CKLED2001_MSKPWM_DELAY_PHASE_ENABLE); | ||
| 113 | // Setting Driving/Sinking Channel Slew Rate | ||
| 114 | ckled2001_write_register(addr, CKLED2001_REG_SLEW_RATE_CONTROL_MODE2, CKLED2001_MSKDRIVING_SINKING_CHANNEL_SLEWRATE_ENABLE); | ||
| 115 | // Setting Iref | ||
| 116 | ckled2001_write_register(addr, CKLED2001_REG_SOFTWARE_SLEEP, CKLED2001_MSKSLEEP_DISABLE); | ||
| 117 | // Set LED CONTROL PAGE (Page 0) | ||
| 118 | ckled2001_write_register(addr, CKLED2001_REG_CONFIGURE_CMD_PAGE, CKLED2001_LED_CONTROL_PAGE); | ||
| 119 | for (int i = 0; i < CKLED2001_LED_CONTROL_ON_OFF_LENGTH; i++) { | ||
| 120 | ckled2001_write_register(addr, i, 0x00); | ||
| 121 | } | ||
| 122 | |||
| 123 | // Set PWM PAGE (Page 1) | ||
| 124 | ckled2001_write_register(addr, CKLED2001_REG_CONFIGURE_CMD_PAGE, CKLED2001_LED_PWM_PAGE); | ||
| 125 | for (int i = 0; i < CKLED2001_LED_CURRENT_TUNE_LENGTH; i++) { | ||
| 126 | ckled2001_write_register(addr, i, 0x00); | ||
| 127 | } | ||
| 128 | |||
| 129 | // Set CURRENT PAGE (Page 4) | ||
| 130 | uint8_t current_tune_reg_list[CKLED2001_LED_CURRENT_TUNE_LENGTH] = CKLED2001_CURRENT_TUNE; | ||
| 131 | ckled2001_write_register(addr, CKLED2001_REG_CONFIGURE_CMD_PAGE, CKLED2001_CURRENT_TUNE_PAGE); | ||
| 132 | for (int i = 0; i < CKLED2001_LED_CURRENT_TUNE_LENGTH; i++) { | ||
| 133 | ckled2001_write_register(addr, i, current_tune_reg_list[i]); | ||
| 134 | } | ||
| 135 | |||
| 136 | // Enable LEDs ON/OFF | ||
| 137 | ckled2001_write_register(addr, CKLED2001_REG_CONFIGURE_CMD_PAGE, CKLED2001_LED_CONTROL_PAGE); | ||
| 138 | for (int i = 0; i < CKLED2001_LED_CONTROL_ON_OFF_LENGTH; i++) { | ||
| 139 | ckled2001_write_register(addr, i, 0xFF); | ||
| 140 | } | ||
| 141 | |||
| 142 | // Select to function page | ||
| 143 | ckled2001_write_register(addr, CKLED2001_REG_CONFIGURE_CMD_PAGE, CKLED2001_FUNCTION_PAGE); | ||
| 144 | // Setting LED driver to normal mode | ||
| 145 | ckled2001_write_register(addr, CKLED2001_REG_CONFIGURATION, CKLED2001_MSKSW_NORMAL_MODE); | ||
| 146 | } | ||
| 147 | |||
| 148 | void ckled2001_set_value(int index, uint8_t value) { | ||
| 149 | ckled2001_led led; | ||
| 150 | if (index >= 0 && index < LED_MATRIX_LED_COUNT) { | ||
| 151 | memcpy_P(&led, (&g_ckled2001_leds[index]), sizeof(led)); | ||
| 152 | |||
| 153 | if (g_pwm_buffer[led.driver][led.v] == value) { | ||
| 154 | return; | ||
| 155 | } | ||
| 156 | g_pwm_buffer[led.driver][led.v] = value; | ||
| 157 | g_pwm_buffer_update_required[led.driver] = true; | ||
| 158 | } | ||
| 159 | } | ||
| 160 | |||
| 161 | void ckled2001_set_value_all(uint8_t value) { | ||
| 162 | for (int i = 0; i < LED_MATRIX_LED_COUNT; i++) { | ||
| 163 | ckled2001_set_value(i, value); | ||
| 164 | } | ||
| 165 | } | ||
| 166 | |||
| 167 | void ckled2001_set_led_control_register(uint8_t index, bool value) { | ||
| 168 | ckled2001_led led; | ||
| 169 | memcpy_P(&led, (&g_ckled2001_leds[index]), sizeof(led)); | ||
| 170 | |||
| 171 | uint8_t control_register = led.v / 8; | ||
| 172 | uint8_t bit_value = led.v % 8; | ||
| 173 | |||
| 174 | if (value) { | ||
| 175 | g_led_control_registers[led.driver][control_register] |= (1 << bit_value); | ||
| 176 | } else { | ||
| 177 | g_led_control_registers[led.driver][control_register] &= ~(1 << bit_value); | ||
| 178 | } | ||
| 179 | |||
| 180 | g_led_control_registers_update_required[led.driver] = true; | ||
| 181 | } | ||
| 182 | |||
| 183 | void ckled2001_update_pwm_buffers(uint8_t addr, uint8_t index) { | ||
| 184 | if (g_pwm_buffer_update_required[index]) { | ||
| 185 | ckled2001_write_register(addr, CKLED2001_REG_CONFIGURE_CMD_PAGE, CKLED2001_LED_PWM_PAGE); | ||
| 186 | |||
| 187 | // If any of the transactions fail we risk writing dirty PG0, | ||
| 188 | // refresh page 0 just in case. | ||
| 189 | if (!ckled2001_write_pwm_buffer(addr, g_pwm_buffer[index])) { | ||
| 190 | g_led_control_registers_update_required[index] = true; | ||
| 191 | } | ||
| 192 | } | ||
| 193 | g_pwm_buffer_update_required[index] = false; | ||
| 194 | } | ||
| 195 | |||
| 196 | void ckled2001_update_led_control_registers(uint8_t addr, uint8_t index) { | ||
| 197 | if (g_led_control_registers_update_required[index]) { | ||
| 198 | ckled2001_write_register(addr, CKLED2001_REG_CONFIGURE_CMD_PAGE, CKLED2001_LED_CONTROL_PAGE); | ||
| 199 | for (int i = 0; i < 24; i++) { | ||
| 200 | ckled2001_write_register(addr, i, g_led_control_registers[index][i]); | ||
| 201 | } | ||
| 202 | } | ||
| 203 | g_led_control_registers_update_required[index] = false; | ||
| 204 | } | ||
| 205 | |||
| 206 | void ckled2001_sw_return_normal(uint8_t addr) { | ||
| 207 | // Select to function page | ||
| 208 | ckled2001_write_register(addr, CKLED2001_REG_CONFIGURE_CMD_PAGE, CKLED2001_FUNCTION_PAGE); | ||
| 209 | // Setting LED driver to normal mode | ||
| 210 | ckled2001_write_register(addr, CKLED2001_REG_CONFIGURATION, CKLED2001_MSKSW_NORMAL_MODE); | ||
| 211 | } | ||
| 212 | |||
| 213 | void ckled2001_sw_shutdown(uint8_t addr) { | ||
| 214 | // Select to function page | ||
| 215 | ckled2001_write_register(addr, CKLED2001_REG_CONFIGURE_CMD_PAGE, CKLED2001_FUNCTION_PAGE); | ||
| 216 | // Setting LED driver to shutdown mode | ||
| 217 | ckled2001_write_register(addr, CKLED2001_REG_CONFIGURATION, CKLED2001_MSKSW_SHUT_DOWN_MODE); | ||
| 218 | // Write SW Sleep Register | ||
| 219 | ckled2001_write_register(addr, CKLED2001_REG_SOFTWARE_SLEEP, CKLED2001_MSKSLEEP_ENABLE); | ||
| 220 | } | ||
diff --git a/drivers/led/ckled2001-simple.h b/drivers/led/ckled2001-simple.h deleted file mode 100644 index 1080da34c2..0000000000 --- a/drivers/led/ckled2001-simple.h +++ /dev/null | |||
| @@ -1,370 +0,0 @@ | |||
| 1 | /* Copyright 2021 @ Keychron (https://www.keychron.com) | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #pragma once | ||
| 18 | |||
| 19 | #include <stdint.h> | ||
| 20 | #include <stdbool.h> | ||
| 21 | #include "progmem.h" | ||
| 22 | |||
| 23 | // ======== DEPRECATED DEFINES - DO NOT USE ======== | ||
| 24 | #ifdef DRIVER_COUNT | ||
| 25 | # define CKLED2001_DRIVER_COUNT DRIVER_COUNT | ||
| 26 | #endif | ||
| 27 | #ifdef CKLED2001_TIMEOUT | ||
| 28 | # define CKLED2001_I2C_TIMEOUT CKLED2001_TIMEOUT | ||
| 29 | #endif | ||
| 30 | #ifdef CKLED2001_PERSISTENCE | ||
| 31 | # define CKLED2001_I2C_PERSISTENCE CKLED2001_PERSISTENCE | ||
| 32 | #endif | ||
| 33 | #ifdef PHASE_CHANNEL | ||
| 34 | # define CKLED2001_PHASE_CHANNEL PHASE_CHANNEL | ||
| 35 | #endif | ||
| 36 | |||
| 37 | #define MSKPHASE_12CHANNEL CKLED2001_MSKPHASE_12CHANNEL | ||
| 38 | #define MSKPHASE_11CHANNEL CKLED2001_MSKPHASE_11CHANNEL | ||
| 39 | #define MSKPHASE_10CHANNEL CKLED2001_MSKPHASE_10CHANNEL | ||
| 40 | #define MSKPHASE_9CHANNEL CKLED2001_MSKPHASE_9CHANNEL | ||
| 41 | #define MSKPHASE_8CHANNEL CKLED2001_MSKPHASE_8CHANNEL | ||
| 42 | #define MSKPHASE_7CHANNEL CKLED2001_MSKPHASE_7CHANNEL | ||
| 43 | #define MSKPHASE_6CHANNEL CKLED2001_MSKPHASE_6CHANNEL | ||
| 44 | #define MSKPHASE_5CHANNEL CKLED2001_MSKPHASE_5CHANNEL | ||
| 45 | #define MSKPHASE_4CHANNEL CKLED2001_MSKPHASE_4CHANNEL | ||
| 46 | #define MSKPHASE_3CHANNEL CKLED2001_MSKPHASE_3CHANNEL | ||
| 47 | #define MSKPHASE_2CHANNEL CKLED2001_MSKPHASE_2CHANNEL | ||
| 48 | #define MSKPHASE_1CHANNEL CKLED2001_MSKPHASE_1CHANNEL | ||
| 49 | // ======== | ||
| 50 | |||
| 51 | #define CKLED2001_I2C_ADDRESS_GND 0x74 | ||
| 52 | #define CKLED2001_I2C_ADDRESS_SCL 0x75 | ||
| 53 | #define CKLED2001_I2C_ADDRESS_SDA 0x76 | ||
| 54 | #define CKLED2001_I2C_ADDRESS_VDDIO 0x77 | ||
| 55 | |||
| 56 | typedef struct ckled2001_led { | ||
| 57 | uint8_t driver : 2; | ||
| 58 | uint8_t v; | ||
| 59 | } __attribute__((packed)) ckled2001_led; | ||
| 60 | |||
| 61 | extern const ckled2001_led PROGMEM g_ckled2001_leds[LED_MATRIX_LED_COUNT]; | ||
| 62 | |||
| 63 | void ckled2001_init(uint8_t addr); | ||
| 64 | bool ckled2001_write_register(uint8_t addr, uint8_t reg, uint8_t data); | ||
| 65 | bool ckled2001_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer); | ||
| 66 | |||
| 67 | void ckled2001_set_value(int index, uint8_t value); | ||
| 68 | void ckled2001_set_value_all(uint8_t value); | ||
| 69 | |||
| 70 | void ckled2001_set_led_control_register(uint8_t index, bool value); | ||
| 71 | |||
| 72 | // This should not be called from an interrupt | ||
| 73 | // (eg. from a timer interrupt). | ||
| 74 | // Call this while idle (in between matrix scans). | ||
| 75 | // If the buffer is dirty, it will update the driver with the buffer. | ||
| 76 | void ckled2001_update_pwm_buffers(uint8_t addr, uint8_t index); | ||
| 77 | void ckled2001_update_led_control_registers(uint8_t addr, uint8_t index); | ||
| 78 | |||
| 79 | void ckled2001_sw_return_normal(uint8_t addr); | ||
| 80 | void ckled2001_sw_shutdown(uint8_t addr); | ||
| 81 | |||
| 82 | // Registers Page Define | ||
| 83 | #define CKLED2001_REG_CONFIGURE_CMD_PAGE 0xFD | ||
| 84 | #define CKLED2001_LED_CONTROL_PAGE 0x00 | ||
| 85 | #define CKLED2001_LED_PWM_PAGE 0x01 | ||
| 86 | #define CKLED2001_FUNCTION_PAGE 0x03 | ||
| 87 | #define CKLED2001_CURRENT_TUNE_PAGE 0x04 | ||
| 88 | |||
| 89 | // Function Register: address 0x00 | ||
| 90 | #define CKLED2001_REG_CONFIGURATION 0x00 | ||
| 91 | #define CKLED2001_MSKSW_SHUT_DOWN_MODE (0x0 << 0) | ||
| 92 | #define CKLED2001_MSKSW_NORMAL_MODE (0x1 << 0) | ||
| 93 | |||
| 94 | #define CKLED2001_REG_DRIVER_ID 0x11 | ||
| 95 | #define CKLED2001_DRIVER_ID 0x8A | ||
| 96 | |||
| 97 | #define CKLED2001_REG_PDU 0x13 | ||
| 98 | #define CKLED2001_MSKSET_CA_CB_CHANNEL 0xAA | ||
| 99 | #define CKLED2001_MSKCLR_CA_CB_CHANNEL 0x00 | ||
| 100 | |||
| 101 | #define CKLED2001_REG_SCAN_PHASE 0x14 | ||
| 102 | #define CKLED2001_MSKPHASE_12CHANNEL 0x00 | ||
| 103 | #define CKLED2001_MSKPHASE_11CHANNEL 0x01 | ||
| 104 | #define CKLED2001_MSKPHASE_10CHANNEL 0x02 | ||
| 105 | #define CKLED2001_MSKPHASE_9CHANNEL 0x03 | ||
| 106 | #define CKLED2001_MSKPHASE_8CHANNEL 0x04 | ||
| 107 | #define CKLED2001_MSKPHASE_7CHANNEL 0x05 | ||
| 108 | #define CKLED2001_MSKPHASE_6CHANNEL 0x06 | ||
| 109 | #define CKLED2001_MSKPHASE_5CHANNEL 0x07 | ||
| 110 | #define CKLED2001_MSKPHASE_4CHANNEL 0x08 | ||
| 111 | #define CKLED2001_MSKPHASE_3CHANNEL 0x09 | ||
| 112 | #define CKLED2001_MSKPHASE_2CHANNEL 0x0A | ||
| 113 | #define CKLED2001_MSKPHASE_1CHANNEL 0x0B | ||
| 114 | |||
| 115 | #define CKLED2001_REG_SLEW_RATE_CONTROL_MODE1 0x15 | ||
| 116 | #define CKLED2001_MSKPWM_DELAY_PHASE_ENABLE 0x04 | ||
| 117 | #define CKLED2001_MSKPWM_DELAY_PHASE_DISABLE 0x00 | ||
| 118 | |||
| 119 | #define CKLED2001_REG_SLEW_RATE_CONTROL_MODE2 0x16 | ||
| 120 | #define CKLED2001_MSKDRIVING_SINKING_CHANNEL_SLEWRATE_ENABLE 0xC0 | ||
| 121 | #define CKLED2001_MSKDRIVING_SINKING_CHANNEL_SLEWRATE_DISABLE 0x00 | ||
| 122 | |||
| 123 | #define CKLED2001_REG_OPEN_SHORT_ENABLE 0x17 | ||
| 124 | #define CKLED2001_MSKOPEN_DETECTION_ENABLE (0x01 << 7) | ||
| 125 | #define CKLED2001_MSKOPEN_DETECTION_DISABLE (0x00) | ||
| 126 | |||
| 127 | #define CKLED2001_MSKSHORT_DETECTION_ENABLE (0x01 << 6) | ||
| 128 | #define CKLED2001_MSKSHORT_DETECTION_DISABLE (0x00) | ||
| 129 | |||
| 130 | #define CKLED2001_REG_OPEN_SHORT_DUTY 0x18 | ||
| 131 | #define CKLED2001_REG_OPEN_SHORT_FLAG 0x19 | ||
| 132 | |||
| 133 | #define CKLED2001_MSKOPEN_DETECTION_INTERRUPT_ENABLE (0x01 << 7) | ||
| 134 | #define CKLED2001_MSKOPEN_DETECTION_INTERRUPT_DISABLE (0x00) | ||
| 135 | |||
| 136 | #define CKLED2001_MSKSHORT_DETECTION_INTERRUPT_ENABLE (0x01 << 6) | ||
| 137 | #define CKLED2001_MSKSHORT_DETECTION_INTERRUPT_DISABLE (0x00) | ||
| 138 | |||
| 139 | #define CKLED2001_REG_SOFTWARE_SLEEP 0x1A | ||
| 140 | #define CKLED2001_MSKSLEEP_ENABLE 0x02 | ||
| 141 | #define CKLED2001_MSKSLEEP_DISABLE 0x00 | ||
| 142 | |||
| 143 | // LED Control Registers | ||
| 144 | #define CKLED2001_LED_CONTROL_ON_OFF_FIRST_ADDR 0x0 | ||
| 145 | #define CKLED2001_LED_CONTROL_ON_OFF_LAST_ADDR 0x17 | ||
| 146 | #define CKLED2001_LED_CONTROL_ON_OFF_LENGTH ((CKLED2001_LED_CONTROL_ON_OFF_LAST_ADDR - CKLED2001_LED_CONTROL_ON_OFF_FIRST_ADDR) + 1) | ||
| 147 | |||
| 148 | #define CKLED2001_LED_CONTROL_OPEN_FIRST_ADDR 0x18 | ||
| 149 | #define CKLED2001_LED_CONTROL_OPEN_LAST_ADDR 0x2F | ||
| 150 | #define CKLED2001_LED_CONTROL_OPEN_LENGTH ((CKLED2001_LED_CONTROL_OPEN_LAST_ADDR - CKLED2001_LED_CONTROL_OPEN_FIRST_ADDR) + 1) | ||
| 151 | |||
| 152 | #define CKLED2001_LED_CONTROL_SHORT_FIRST_ADDR 0x30 | ||
| 153 | #define CKLED2001_LED_CONTROL_SHORT_LAST_ADDR 0x47 | ||
| 154 | #define CKLED2001_LED_CONTROL_SHORT_LENGTH ((CKLED2001_LED_CONTROL_SHORT_LAST_ADDR - CKLED2001_LED_CONTROL_SHORT_FIRST_ADDR) + 1) | ||
| 155 | |||
| 156 | #define CKLED2001_LED_CONTROL_PAGE_LENGTH 0x48 | ||
| 157 | |||
| 158 | // LED Control Registers | ||
| 159 | #define CKLED2001_LED_PWM_FIRST_ADDR 0x00 | ||
| 160 | #define CKLED2001_LED_PWM_LAST_ADDR 0xBF | ||
| 161 | #define CKLED2001_LED_PWM_LENGTH 0xC0 | ||
| 162 | |||
| 163 | // Current Tune Registers | ||
| 164 | #define CKLED2001_LED_CURRENT_TUNE_FIRST_ADDR 0x00 | ||
| 165 | #define CKLED2001_LED_CURRENT_TUNE_LAST_ADDR 0x0B | ||
| 166 | #define CKLED2001_LED_CURRENT_TUNE_LENGTH 0x0C | ||
| 167 | |||
| 168 | #define A_1 0x00 | ||
| 169 | #define A_2 0x01 | ||
| 170 | #define A_3 0x02 | ||
| 171 | #define A_4 0x03 | ||
| 172 | #define A_5 0x04 | ||
| 173 | #define A_6 0x05 | ||
| 174 | #define A_7 0x06 | ||
| 175 | #define A_8 0x07 | ||
| 176 | #define A_9 0x08 | ||
| 177 | #define A_10 0x09 | ||
| 178 | #define A_11 0x0A | ||
| 179 | #define A_12 0x0B | ||
| 180 | #define A_13 0x0C | ||
| 181 | #define A_14 0x0D | ||
| 182 | #define A_15 0x0E | ||
| 183 | #define A_16 0x0F | ||
| 184 | |||
| 185 | #define B_1 0x10 | ||
| 186 | #define B_2 0x11 | ||
| 187 | #define B_3 0x12 | ||
| 188 | #define B_4 0x13 | ||
| 189 | #define B_5 0x14 | ||
| 190 | #define B_6 0x15 | ||
| 191 | #define B_7 0x16 | ||
| 192 | #define B_8 0x17 | ||
| 193 | #define B_9 0x18 | ||
| 194 | #define B_10 0x19 | ||
| 195 | #define B_11 0x1A | ||
| 196 | #define B_12 0x1B | ||
| 197 | #define B_13 0x1C | ||
| 198 | #define B_14 0x1D | ||
| 199 | #define B_15 0x1E | ||
| 200 | #define B_16 0x1F | ||
| 201 | |||
| 202 | #define C_1 0x20 | ||
| 203 | #define C_2 0x21 | ||
| 204 | #define C_3 0x22 | ||
| 205 | #define C_4 0x23 | ||
| 206 | #define C_5 0x24 | ||
| 207 | #define C_6 0x25 | ||
| 208 | #define C_7 0x26 | ||
| 209 | #define C_8 0x27 | ||
| 210 | #define C_9 0x28 | ||
| 211 | #define C_10 0x29 | ||
| 212 | #define C_11 0x2A | ||
| 213 | #define C_12 0x2B | ||
| 214 | #define C_13 0x2C | ||
| 215 | #define C_14 0x2D | ||
| 216 | #define C_15 0x2E | ||
| 217 | #define C_16 0x2F | ||
| 218 | |||
| 219 | #define D_1 0x30 | ||
| 220 | #define D_2 0x31 | ||
| 221 | #define D_3 0x32 | ||
| 222 | #define D_4 0x33 | ||
| 223 | #define D_5 0x34 | ||
| 224 | #define D_6 0x35 | ||
| 225 | #define D_7 0x36 | ||
| 226 | #define D_8 0x37 | ||
| 227 | #define D_9 0x38 | ||
| 228 | #define D_10 0x39 | ||
| 229 | #define D_11 0x3A | ||
| 230 | #define D_12 0x3B | ||
| 231 | #define D_13 0x3C | ||
| 232 | #define D_14 0x3D | ||
| 233 | #define D_15 0x3E | ||
| 234 | #define D_16 0x3F | ||
| 235 | |||
| 236 | #define E_1 0x40 | ||
| 237 | #define E_2 0x41 | ||
| 238 | #define E_3 0x42 | ||
| 239 | #define E_4 0x43 | ||
| 240 | #define E_5 0x44 | ||
| 241 | #define E_6 0x45 | ||
| 242 | #define E_7 0x46 | ||
| 243 | #define E_8 0x47 | ||
| 244 | #define E_9 0x48 | ||
| 245 | #define E_10 0x49 | ||
| 246 | #define E_11 0x4A | ||
| 247 | #define E_12 0x4B | ||
| 248 | #define E_13 0x4C | ||
| 249 | #define E_14 0x4D | ||
| 250 | #define E_15 0x4E | ||
| 251 | #define E_16 0x4F | ||
| 252 | |||
| 253 | #define F_1 0x50 | ||
| 254 | #define F_2 0x51 | ||
| 255 | #define F_3 0x52 | ||
| 256 | #define F_4 0x53 | ||
| 257 | #define F_5 0x54 | ||
| 258 | #define F_6 0x55 | ||
| 259 | #define F_7 0x56 | ||
| 260 | #define F_8 0x57 | ||
| 261 | #define F_9 0x58 | ||
| 262 | #define F_10 0x59 | ||
| 263 | #define F_11 0x5A | ||
| 264 | #define F_12 0x5B | ||
| 265 | #define F_13 0x5C | ||
| 266 | #define F_14 0x5D | ||
| 267 | #define F_15 0x5E | ||
| 268 | #define F_16 0x5F | ||
| 269 | |||
| 270 | #define G_1 0x60 | ||
| 271 | #define G_2 0x61 | ||
| 272 | #define G_3 0x62 | ||
| 273 | #define G_4 0x63 | ||
| 274 | #define G_5 0x64 | ||
| 275 | #define G_6 0x65 | ||
| 276 | #define G_7 0x66 | ||
| 277 | #define G_8 0x67 | ||
| 278 | #define G_9 0x68 | ||
| 279 | #define G_10 0x69 | ||
| 280 | #define G_11 0x6A | ||
| 281 | #define G_12 0x6B | ||
| 282 | #define G_13 0x6C | ||
| 283 | #define G_14 0x6D | ||
| 284 | #define G_15 0x6E | ||
| 285 | #define G_16 0x6F | ||
| 286 | |||
| 287 | #define H_1 0x70 | ||
| 288 | #define H_2 0x71 | ||
| 289 | #define H_3 0x72 | ||
| 290 | #define H_4 0x73 | ||
| 291 | #define H_5 0x74 | ||
| 292 | #define H_6 0x75 | ||
| 293 | #define H_7 0x76 | ||
| 294 | #define H_8 0x77 | ||
| 295 | #define H_9 0x78 | ||
| 296 | #define H_10 0x79 | ||
| 297 | #define H_11 0x7A | ||
| 298 | #define H_12 0x7B | ||
| 299 | #define H_13 0x7C | ||
| 300 | #define H_14 0x7D | ||
| 301 | #define H_15 0x7E | ||
| 302 | #define H_16 0x7F | ||
| 303 | |||
| 304 | #define I_1 0x80 | ||
| 305 | #define I_2 0x81 | ||
| 306 | #define I_3 0x82 | ||
| 307 | #define I_4 0x83 | ||
| 308 | #define I_5 0x84 | ||
| 309 | #define I_6 0x85 | ||
| 310 | #define I_7 0x86 | ||
| 311 | #define I_8 0x87 | ||
| 312 | #define I_9 0x88 | ||
| 313 | #define I_10 0x89 | ||
| 314 | #define I_11 0x8A | ||
| 315 | #define I_12 0x8B | ||
| 316 | #define I_13 0x8C | ||
| 317 | #define I_14 0x8D | ||
| 318 | #define I_15 0x8E | ||
| 319 | #define I_16 0x8F | ||
| 320 | |||
| 321 | #define J_1 0x90 | ||
| 322 | #define J_2 0x91 | ||
| 323 | #define J_3 0x92 | ||
| 324 | #define J_4 0x93 | ||
| 325 | #define J_5 0x94 | ||
| 326 | #define J_6 0x95 | ||
| 327 | #define J_7 0x96 | ||
| 328 | #define J_8 0x97 | ||
| 329 | #define J_9 0x98 | ||
| 330 | #define J_10 0x99 | ||
| 331 | #define J_11 0x9A | ||
| 332 | #define J_12 0x9B | ||
| 333 | #define J_13 0x9C | ||
| 334 | #define J_14 0x9D | ||
| 335 | #define J_15 0x9E | ||
| 336 | #define J_16 0x9F | ||
| 337 | |||
| 338 | #define K_1 0xA0 | ||
| 339 | #define K_2 0xA1 | ||
| 340 | #define K_3 0xA2 | ||
| 341 | #define K_4 0xA3 | ||
| 342 | #define K_5 0xA4 | ||
| 343 | #define K_6 0xA5 | ||
| 344 | #define K_7 0xA6 | ||
| 345 | #define K_8 0xA7 | ||
| 346 | #define K_9 0xA8 | ||
| 347 | #define K_10 0xA9 | ||
| 348 | #define K_11 0xAA | ||
| 349 | #define K_12 0xAB | ||
| 350 | #define K_13 0xAC | ||
| 351 | #define K_14 0xAD | ||
| 352 | #define K_15 0xAE | ||
| 353 | #define K_16 0xAF | ||
| 354 | |||
| 355 | #define L_1 0xB0 | ||
| 356 | #define L_2 0xB1 | ||
| 357 | #define L_3 0xB2 | ||
| 358 | #define L_4 0xB3 | ||
| 359 | #define L_5 0xB4 | ||
| 360 | #define L_6 0xB5 | ||
| 361 | #define L_7 0xB6 | ||
| 362 | #define L_8 0xB7 | ||
| 363 | #define L_9 0xB8 | ||
| 364 | #define L_10 0xB9 | ||
| 365 | #define L_11 0xBA | ||
| 366 | #define L_12 0xBB | ||
| 367 | #define L_13 0xBC | ||
| 368 | #define L_14 0xBD | ||
| 369 | #define L_15 0xBE | ||
| 370 | #define L_16 0xBF | ||
diff --git a/drivers/led/ckled2001.c b/drivers/led/ckled2001.c deleted file mode 100644 index 8340aae823..0000000000 --- a/drivers/led/ckled2001.c +++ /dev/null | |||
| @@ -1,235 +0,0 @@ | |||
| 1 | /* Copyright 2021 @ Keychron (https://www.keychron.com) | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include "ckled2001.h" | ||
| 18 | #include "i2c_master.h" | ||
| 19 | |||
| 20 | #ifndef CKLED2001_I2C_TIMEOUT | ||
| 21 | # define CKLED2001_I2C_TIMEOUT 100 | ||
| 22 | #endif | ||
| 23 | |||
| 24 | #ifndef CKLED2001_I2C_PERSISTENCE | ||
| 25 | # define CKLED2001_I2C_PERSISTENCE 0 | ||
| 26 | #endif | ||
| 27 | |||
| 28 | #ifndef CKLED2001_PHASE_CHANNEL | ||
| 29 | # define CKLED2001_PHASE_CHANNEL CKLED2001_MSKPHASE_12CHANNEL | ||
| 30 | #endif | ||
| 31 | |||
| 32 | #ifndef CKLED2001_CURRENT_TUNE | ||
| 33 | # define CKLED2001_CURRENT_TUNE \ | ||
| 34 | { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF } | ||
| 35 | #endif | ||
| 36 | |||
| 37 | // Transfer buffer for TWITransmitData() | ||
| 38 | uint8_t g_twi_transfer_buffer[65]; | ||
| 39 | |||
| 40 | // These buffers match the CKLED2001 PWM registers. | ||
| 41 | // The control buffers match the PG0 LED On/Off registers. | ||
| 42 | // Storing them like this is optimal for I2C transfers to the registers. | ||
| 43 | // We could optimize this and take out the unused registers from these | ||
| 44 | // buffers and the transfers in ckled2001_write_pwm_buffer() but it's | ||
| 45 | // probably not worth the extra complexity. | ||
| 46 | uint8_t g_pwm_buffer[CKLED2001_DRIVER_COUNT][192]; | ||
| 47 | bool g_pwm_buffer_update_required[CKLED2001_DRIVER_COUNT] = {false}; | ||
| 48 | |||
| 49 | uint8_t g_led_control_registers[CKLED2001_DRIVER_COUNT][24] = {0}; | ||
| 50 | bool g_led_control_registers_update_required[CKLED2001_DRIVER_COUNT] = {false}; | ||
| 51 | |||
| 52 | bool ckled2001_write_register(uint8_t addr, uint8_t reg, uint8_t data) { | ||
| 53 | // If the transaction fails function returns false. | ||
| 54 | g_twi_transfer_buffer[0] = reg; | ||
| 55 | g_twi_transfer_buffer[1] = data; | ||
| 56 | |||
| 57 | #if CKLED2001_I2C_PERSISTENCE > 0 | ||
| 58 | for (uint8_t i = 0; i < CKLED2001_I2C_PERSISTENCE; i++) { | ||
| 59 | if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, CKLED2001_I2C_TIMEOUT) != 0) { | ||
| 60 | return false; | ||
| 61 | } | ||
| 62 | } | ||
| 63 | #else | ||
| 64 | if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, CKLED2001_I2C_TIMEOUT) != 0) { | ||
| 65 | return false; | ||
| 66 | } | ||
| 67 | #endif | ||
| 68 | return true; | ||
| 69 | } | ||
| 70 | |||
| 71 | bool ckled2001_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) { | ||
| 72 | // Assumes PG1 is already selected. | ||
| 73 | // If any of the transactions fails function returns false. | ||
| 74 | // Transmit PWM registers in 3 transfers of 64 bytes. | ||
| 75 | |||
| 76 | // Iterate over the pwm_buffer contents at 64 byte intervals. | ||
| 77 | for (uint8_t i = 0; i < 192; i += 64) { | ||
| 78 | g_twi_transfer_buffer[0] = i; | ||
| 79 | // Copy the data from i to i+63. | ||
| 80 | // Device will auto-increment register for data after the first byte | ||
| 81 | // Thus this sets registers 0x00-0x0F, 0x10-0x1F, etc. in one transfer. | ||
| 82 | for (uint8_t j = 0; j < 64; j++) { | ||
| 83 | g_twi_transfer_buffer[1 + j] = pwm_buffer[i + j]; | ||
| 84 | } | ||
| 85 | |||
| 86 | #if CKLED2001_I2C_PERSISTENCE > 0 | ||
| 87 | for (uint8_t i = 0; i < CKLED2001_I2C_PERSISTENCE; i++) { | ||
| 88 | if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 65, CKLED2001_I2C_TIMEOUT) != 0) { | ||
| 89 | return false; | ||
| 90 | } | ||
| 91 | } | ||
| 92 | #else | ||
| 93 | if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 65, CKLED2001_I2C_TIMEOUT) != 0) { | ||
| 94 | return false; | ||
| 95 | } | ||
| 96 | #endif | ||
| 97 | } | ||
| 98 | return true; | ||
| 99 | } | ||
| 100 | |||
| 101 | void ckled2001_init(uint8_t addr) { | ||
| 102 | // Select to function page | ||
| 103 | ckled2001_write_register(addr, CKLED2001_REG_CONFIGURE_CMD_PAGE, CKLED2001_FUNCTION_PAGE); | ||
| 104 | // Setting LED driver to shutdown mode | ||
| 105 | ckled2001_write_register(addr, CKLED2001_REG_CONFIGURATION, CKLED2001_MSKSW_SHUT_DOWN_MODE); | ||
| 106 | // Setting internal channel pulldown/pullup | ||
| 107 | ckled2001_write_register(addr, CKLED2001_REG_PDU, CKLED2001_MSKSET_CA_CB_CHANNEL); | ||
| 108 | // Select number of scan phase | ||
| 109 | ckled2001_write_register(addr, CKLED2001_REG_SCAN_PHASE, CKLED2001_PHASE_CHANNEL); | ||
| 110 | // Setting PWM Delay Phase | ||
| 111 | ckled2001_write_register(addr, CKLED2001_REG_SLEW_RATE_CONTROL_MODE1, CKLED2001_MSKPWM_DELAY_PHASE_ENABLE); | ||
| 112 | // Setting Driving/Sinking Channel Slew Rate | ||
| 113 | ckled2001_write_register(addr, CKLED2001_REG_SLEW_RATE_CONTROL_MODE2, CKLED2001_MSKDRIVING_SINKING_CHANNEL_SLEWRATE_ENABLE); | ||
| 114 | // Setting Iref | ||
| 115 | ckled2001_write_register(addr, CKLED2001_REG_SOFTWARE_SLEEP, CKLED2001_MSKSLEEP_DISABLE); | ||
| 116 | // Set LED CONTROL PAGE (Page 0) | ||
| 117 | ckled2001_write_register(addr, CKLED2001_REG_CONFIGURE_CMD_PAGE, CKLED2001_LED_CONTROL_PAGE); | ||
| 118 | for (int i = 0; i < CKLED2001_LED_CONTROL_ON_OFF_LENGTH; i++) { | ||
| 119 | ckled2001_write_register(addr, i, 0x00); | ||
| 120 | } | ||
| 121 | |||
| 122 | // Set PWM PAGE (Page 1) | ||
| 123 | ckled2001_write_register(addr, CKLED2001_REG_CONFIGURE_CMD_PAGE, CKLED2001_LED_PWM_PAGE); | ||
| 124 | for (int i = 0; i < CKLED2001_LED_CURRENT_TUNE_LENGTH; i++) { | ||
| 125 | ckled2001_write_register(addr, i, 0x00); | ||
| 126 | } | ||
| 127 | |||
| 128 | // Set CURRENT PAGE (Page 4) | ||
| 129 | uint8_t current_tune_reg_list[CKLED2001_LED_CURRENT_TUNE_LENGTH] = CKLED2001_CURRENT_TUNE; | ||
| 130 | ckled2001_write_register(addr, CKLED2001_REG_CONFIGURE_CMD_PAGE, CKLED2001_CURRENT_TUNE_PAGE); | ||
| 131 | for (int i = 0; i < CKLED2001_LED_CURRENT_TUNE_LENGTH; i++) { | ||
| 132 | ckled2001_write_register(addr, i, current_tune_reg_list[i]); | ||
| 133 | } | ||
| 134 | |||
| 135 | // Enable LEDs ON/OFF | ||
| 136 | ckled2001_write_register(addr, CKLED2001_REG_CONFIGURE_CMD_PAGE, CKLED2001_LED_CONTROL_PAGE); | ||
| 137 | for (int i = 0; i < CKLED2001_LED_CONTROL_ON_OFF_LENGTH; i++) { | ||
| 138 | ckled2001_write_register(addr, i, 0xFF); | ||
| 139 | } | ||
| 140 | |||
| 141 | // Select to function page | ||
| 142 | ckled2001_write_register(addr, CKLED2001_REG_CONFIGURE_CMD_PAGE, CKLED2001_FUNCTION_PAGE); | ||
| 143 | // Setting LED driver to normal mode | ||
| 144 | ckled2001_write_register(addr, CKLED2001_REG_CONFIGURATION, CKLED2001_MSKSW_NORMAL_MODE); | ||
| 145 | } | ||
| 146 | |||
| 147 | void ckled2001_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { | ||
| 148 | ckled2001_led led; | ||
| 149 | if (index >= 0 && index < RGB_MATRIX_LED_COUNT) { | ||
| 150 | memcpy_P(&led, (&g_ckled2001_leds[index]), sizeof(led)); | ||
| 151 | |||
| 152 | if (g_pwm_buffer[led.driver][led.r] == red && g_pwm_buffer[led.driver][led.g] == green && g_pwm_buffer[led.driver][led.b] == blue) { | ||
| 153 | return; | ||
| 154 | } | ||
| 155 | g_pwm_buffer[led.driver][led.r] = red; | ||
| 156 | g_pwm_buffer[led.driver][led.g] = green; | ||
| 157 | g_pwm_buffer[led.driver][led.b] = blue; | ||
| 158 | g_pwm_buffer_update_required[led.driver] = true; | ||
| 159 | } | ||
| 160 | } | ||
| 161 | |||
| 162 | void ckled2001_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { | ||
| 163 | for (int i = 0; i < RGB_MATRIX_LED_COUNT; i++) { | ||
| 164 | ckled2001_set_color(i, red, green, blue); | ||
| 165 | } | ||
| 166 | } | ||
| 167 | |||
| 168 | void ckled2001_set_led_control_register(uint8_t index, bool red, bool green, bool blue) { | ||
| 169 | ckled2001_led led; | ||
| 170 | memcpy_P(&led, (&g_ckled2001_leds[index]), sizeof(led)); | ||
| 171 | |||
| 172 | uint8_t control_register_r = led.r / 8; | ||
| 173 | uint8_t control_register_g = led.g / 8; | ||
| 174 | uint8_t control_register_b = led.b / 8; | ||
| 175 | uint8_t bit_r = led.r % 8; | ||
| 176 | uint8_t bit_g = led.g % 8; | ||
| 177 | uint8_t bit_b = led.b % 8; | ||
| 178 | |||
| 179 | if (red) { | ||
| 180 | g_led_control_registers[led.driver][control_register_r] |= (1 << bit_r); | ||
| 181 | } else { | ||
| 182 | g_led_control_registers[led.driver][control_register_r] &= ~(1 << bit_r); | ||
| 183 | } | ||
| 184 | if (green) { | ||
| 185 | g_led_control_registers[led.driver][control_register_g] |= (1 << bit_g); | ||
| 186 | } else { | ||
| 187 | g_led_control_registers[led.driver][control_register_g] &= ~(1 << bit_g); | ||
| 188 | } | ||
| 189 | if (blue) { | ||
| 190 | g_led_control_registers[led.driver][control_register_b] |= (1 << bit_b); | ||
| 191 | } else { | ||
| 192 | g_led_control_registers[led.driver][control_register_b] &= ~(1 << bit_b); | ||
| 193 | } | ||
| 194 | |||
| 195 | g_led_control_registers_update_required[led.driver] = true; | ||
| 196 | } | ||
| 197 | |||
| 198 | void ckled2001_update_pwm_buffers(uint8_t addr, uint8_t index) { | ||
| 199 | if (g_pwm_buffer_update_required[index]) { | ||
| 200 | ckled2001_write_register(addr, CKLED2001_REG_CONFIGURE_CMD_PAGE, CKLED2001_LED_PWM_PAGE); | ||
| 201 | |||
| 202 | // If any of the transactions fail we risk writing dirty PG0, | ||
| 203 | // refresh page 0 just in case. | ||
| 204 | if (!ckled2001_write_pwm_buffer(addr, g_pwm_buffer[index])) { | ||
| 205 | g_led_control_registers_update_required[index] = true; | ||
| 206 | } | ||
| 207 | } | ||
| 208 | g_pwm_buffer_update_required[index] = false; | ||
| 209 | } | ||
| 210 | |||
| 211 | void ckled2001_update_led_control_registers(uint8_t addr, uint8_t index) { | ||
| 212 | if (g_led_control_registers_update_required[index]) { | ||
| 213 | ckled2001_write_register(addr, CKLED2001_REG_CONFIGURE_CMD_PAGE, CKLED2001_LED_CONTROL_PAGE); | ||
| 214 | for (int i = 0; i < 24; i++) { | ||
| 215 | ckled2001_write_register(addr, i, g_led_control_registers[index][i]); | ||
| 216 | } | ||
| 217 | } | ||
| 218 | g_led_control_registers_update_required[index] = false; | ||
| 219 | } | ||
| 220 | |||
| 221 | void ckled2001_sw_return_normal(uint8_t addr) { | ||
| 222 | // Select to function page | ||
| 223 | ckled2001_write_register(addr, CKLED2001_REG_CONFIGURE_CMD_PAGE, CKLED2001_FUNCTION_PAGE); | ||
| 224 | // Setting LED driver to normal mode | ||
| 225 | ckled2001_write_register(addr, CKLED2001_REG_CONFIGURATION, CKLED2001_MSKSW_NORMAL_MODE); | ||
| 226 | } | ||
| 227 | |||
| 228 | void ckled2001_sw_shutdown(uint8_t addr) { | ||
| 229 | // Select to function page | ||
| 230 | ckled2001_write_register(addr, CKLED2001_REG_CONFIGURE_CMD_PAGE, CKLED2001_FUNCTION_PAGE); | ||
| 231 | // Setting LED driver to shutdown mode | ||
| 232 | ckled2001_write_register(addr, CKLED2001_REG_CONFIGURATION, CKLED2001_MSKSW_SHUT_DOWN_MODE); | ||
| 233 | // Write SW Sleep Register | ||
| 234 | ckled2001_write_register(addr, CKLED2001_REG_SOFTWARE_SLEEP, CKLED2001_MSKSLEEP_ENABLE); | ||
| 235 | } | ||
diff --git a/drivers/led/ckled2001.h b/drivers/led/ckled2001.h deleted file mode 100644 index 257efbb6a1..0000000000 --- a/drivers/led/ckled2001.h +++ /dev/null | |||
| @@ -1,372 +0,0 @@ | |||
| 1 | /* Copyright 2021 @ Keychron (https://www.keychron.com) | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #pragma once | ||
| 18 | |||
| 19 | #include <stdint.h> | ||
| 20 | #include <stdbool.h> | ||
| 21 | #include "progmem.h" | ||
| 22 | |||
| 23 | // ======== DEPRECATED DEFINES - DO NOT USE ======== | ||
| 24 | #ifdef DRIVER_COUNT | ||
| 25 | # define CKLED2001_DRIVER_COUNT DRIVER_COUNT | ||
| 26 | #endif | ||
| 27 | #ifdef CKLED2001_TIMEOUT | ||
| 28 | # define CKLED2001_I2C_TIMEOUT CKLED2001_TIMEOUT | ||
| 29 | #endif | ||
| 30 | #ifdef CKLED2001_PERSISTENCE | ||
| 31 | # define CKLED2001_I2C_PERSISTENCE CKLED2001_PERSISTENCE | ||
| 32 | #endif | ||
| 33 | #ifdef PHASE_CHANNEL | ||
| 34 | # define CKLED2001_PHASE_CHANNEL PHASE_CHANNEL | ||
| 35 | #endif | ||
| 36 | |||
| 37 | #define MSKPHASE_12CHANNEL CKLED2001_MSKPHASE_12CHANNEL | ||
| 38 | #define MSKPHASE_11CHANNEL CKLED2001_MSKPHASE_11CHANNEL | ||
| 39 | #define MSKPHASE_10CHANNEL CKLED2001_MSKPHASE_10CHANNEL | ||
| 40 | #define MSKPHASE_9CHANNEL CKLED2001_MSKPHASE_9CHANNEL | ||
| 41 | #define MSKPHASE_8CHANNEL CKLED2001_MSKPHASE_8CHANNEL | ||
| 42 | #define MSKPHASE_7CHANNEL CKLED2001_MSKPHASE_7CHANNEL | ||
| 43 | #define MSKPHASE_6CHANNEL CKLED2001_MSKPHASE_6CHANNEL | ||
| 44 | #define MSKPHASE_5CHANNEL CKLED2001_MSKPHASE_5CHANNEL | ||
| 45 | #define MSKPHASE_4CHANNEL CKLED2001_MSKPHASE_4CHANNEL | ||
| 46 | #define MSKPHASE_3CHANNEL CKLED2001_MSKPHASE_3CHANNEL | ||
| 47 | #define MSKPHASE_2CHANNEL CKLED2001_MSKPHASE_2CHANNEL | ||
| 48 | #define MSKPHASE_1CHANNEL CKLED2001_MSKPHASE_1CHANNEL | ||
| 49 | // ======== | ||
| 50 | |||
| 51 | #define CKLED2001_I2C_ADDRESS_GND 0x74 | ||
| 52 | #define CKLED2001_I2C_ADDRESS_SCL 0x75 | ||
| 53 | #define CKLED2001_I2C_ADDRESS_SDA 0x76 | ||
| 54 | #define CKLED2001_I2C_ADDRESS_VDDIO 0x77 | ||
| 55 | |||
| 56 | typedef struct ckled2001_led { | ||
| 57 | uint8_t driver : 2; | ||
| 58 | uint8_t r; | ||
| 59 | uint8_t g; | ||
| 60 | uint8_t b; | ||
| 61 | } __attribute__((packed)) ckled2001_led; | ||
| 62 | |||
| 63 | extern const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT]; | ||
| 64 | |||
| 65 | void ckled2001_init(uint8_t addr); | ||
| 66 | bool ckled2001_write_register(uint8_t addr, uint8_t reg, uint8_t data); | ||
| 67 | bool ckled2001_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer); | ||
| 68 | |||
| 69 | void ckled2001_set_color(int index, uint8_t red, uint8_t green, uint8_t blue); | ||
| 70 | void ckled2001_set_color_all(uint8_t red, uint8_t green, uint8_t blue); | ||
| 71 | |||
| 72 | void ckled2001_set_led_control_register(uint8_t index, bool red, bool green, bool blue); | ||
| 73 | |||
| 74 | // This should not be called from an interrupt | ||
| 75 | // (eg. from a timer interrupt). | ||
| 76 | // Call this while idle (in between matrix scans). | ||
| 77 | // If the buffer is dirty, it will update the driver with the buffer. | ||
| 78 | void ckled2001_update_pwm_buffers(uint8_t addr, uint8_t index); | ||
| 79 | void ckled2001_update_led_control_registers(uint8_t addr, uint8_t index); | ||
| 80 | |||
| 81 | void ckled2001_sw_return_normal(uint8_t addr); | ||
| 82 | void ckled2001_sw_shutdown(uint8_t addr); | ||
| 83 | |||
| 84 | // Registers Page Define | ||
| 85 | #define CKLED2001_REG_CONFIGURE_CMD_PAGE 0xFD | ||
| 86 | #define CKLED2001_LED_CONTROL_PAGE 0x00 | ||
| 87 | #define CKLED2001_LED_PWM_PAGE 0x01 | ||
| 88 | #define CKLED2001_FUNCTION_PAGE 0x03 | ||
| 89 | #define CKLED2001_CURRENT_TUNE_PAGE 0x04 | ||
| 90 | |||
| 91 | // Function Register: address 0x00 | ||
| 92 | #define CKLED2001_REG_CONFIGURATION 0x00 | ||
| 93 | #define CKLED2001_MSKSW_SHUT_DOWN_MODE (0x0 << 0) | ||
| 94 | #define CKLED2001_MSKSW_NORMAL_MODE (0x1 << 0) | ||
| 95 | |||
| 96 | #define CKLED2001_REG_DRIVER_ID 0x11 | ||
| 97 | #define CKLED2001_DRIVER_ID 0x8A | ||
| 98 | |||
| 99 | #define CKLED2001_REG_PDU 0x13 | ||
| 100 | #define CKLED2001_MSKSET_CA_CB_CHANNEL 0xAA | ||
| 101 | #define CKLED2001_MSKCLR_CA_CB_CHANNEL 0x00 | ||
| 102 | |||
| 103 | #define CKLED2001_REG_SCAN_PHASE 0x14 | ||
| 104 | #define CKLED2001_MSKPHASE_12CHANNEL 0x00 | ||
| 105 | #define CKLED2001_MSKPHASE_11CHANNEL 0x01 | ||
| 106 | #define CKLED2001_MSKPHASE_10CHANNEL 0x02 | ||
| 107 | #define CKLED2001_MSKPHASE_9CHANNEL 0x03 | ||
| 108 | #define CKLED2001_MSKPHASE_8CHANNEL 0x04 | ||
| 109 | #define CKLED2001_MSKPHASE_7CHANNEL 0x05 | ||
| 110 | #define CKLED2001_MSKPHASE_6CHANNEL 0x06 | ||
| 111 | #define CKLED2001_MSKPHASE_5CHANNEL 0x07 | ||
| 112 | #define CKLED2001_MSKPHASE_4CHANNEL 0x08 | ||
| 113 | #define CKLED2001_MSKPHASE_3CHANNEL 0x09 | ||
| 114 | #define CKLED2001_MSKPHASE_2CHANNEL 0x0A | ||
| 115 | #define CKLED2001_MSKPHASE_1CHANNEL 0x0B | ||
| 116 | |||
| 117 | #define CKLED2001_REG_SLEW_RATE_CONTROL_MODE1 0x15 | ||
| 118 | #define CKLED2001_MSKPWM_DELAY_PHASE_ENABLE 0x04 | ||
| 119 | #define CKLED2001_MSKPWM_DELAY_PHASE_DISABLE 0x00 | ||
| 120 | |||
| 121 | #define CKLED2001_REG_SLEW_RATE_CONTROL_MODE2 0x16 | ||
| 122 | #define CKLED2001_MSKDRIVING_SINKING_CHANNEL_SLEWRATE_ENABLE 0xC0 | ||
| 123 | #define CKLED2001_MSKDRIVING_SINKING_CHANNEL_SLEWRATE_DISABLE 0x00 | ||
| 124 | |||
| 125 | #define CKLED2001_REG_OPEN_SHORT_ENABLE 0x17 | ||
| 126 | #define CKLED2001_MSKOPEN_DETECTION_ENABLE (0x01 << 7) | ||
| 127 | #define CKLED2001_MSKOPEN_DETECTION_DISABLE (0x00) | ||
| 128 | |||
| 129 | #define CKLED2001_MSKSHORT_DETECTION_ENABLE (0x01 << 6) | ||
| 130 | #define CKLED2001_MSKSHORT_DETECTION_DISABLE (0x00) | ||
| 131 | |||
| 132 | #define CKLED2001_REG_OPEN_SHORT_DUTY 0x18 | ||
| 133 | #define CKLED2001_REG_OPEN_SHORT_FLAG 0x19 | ||
| 134 | |||
| 135 | #define CKLED2001_MSKOPEN_DETECTION_INTERRUPT_ENABLE (0x01 << 7) | ||
| 136 | #define CKLED2001_MSKOPEN_DETECTION_INTERRUPT_DISABLE (0x00) | ||
| 137 | |||
| 138 | #define CKLED2001_MSKSHORT_DETECTION_INTERRUPT_ENABLE (0x01 << 6) | ||
| 139 | #define CKLED2001_MSKSHORT_DETECTION_INTERRUPT_DISABLE (0x00) | ||
| 140 | |||
| 141 | #define CKLED2001_REG_SOFTWARE_SLEEP 0x1A | ||
| 142 | #define CKLED2001_MSKSLEEP_ENABLE 0x02 | ||
| 143 | #define CKLED2001_MSKSLEEP_DISABLE 0x00 | ||
| 144 | |||
| 145 | // LED Control Registers | ||
| 146 | #define CKLED2001_LED_CONTROL_ON_OFF_FIRST_ADDR 0x0 | ||
| 147 | #define CKLED2001_LED_CONTROL_ON_OFF_LAST_ADDR 0x17 | ||
| 148 | #define CKLED2001_LED_CONTROL_ON_OFF_LENGTH ((CKLED2001_LED_CONTROL_ON_OFF_LAST_ADDR - CKLED2001_LED_CONTROL_ON_OFF_FIRST_ADDR) + 1) | ||
| 149 | |||
| 150 | #define CKLED2001_LED_CONTROL_OPEN_FIRST_ADDR 0x18 | ||
| 151 | #define CKLED2001_LED_CONTROL_OPEN_LAST_ADDR 0x2F | ||
| 152 | #define CKLED2001_LED_CONTROL_OPEN_LENGTH ((CKLED2001_LED_CONTROL_OPEN_LAST_ADDR - CKLED2001_LED_CONTROL_OPEN_FIRST_ADDR) + 1) | ||
| 153 | |||
| 154 | #define CKLED2001_LED_CONTROL_SHORT_FIRST_ADDR 0x30 | ||
| 155 | #define CKLED2001_LED_CONTROL_SHORT_LAST_ADDR 0x47 | ||
| 156 | #define CKLED2001_LED_CONTROL_SHORT_LENGTH ((CKLED2001_LED_CONTROL_SHORT_LAST_ADDR - CKLED2001_LED_CONTROL_SHORT_FIRST_ADDR) + 1) | ||
| 157 | |||
| 158 | #define CKLED2001_LED_CONTROL_PAGE_LENGTH 0x48 | ||
| 159 | |||
| 160 | // LED Control Registers | ||
| 161 | #define CKLED2001_LED_PWM_FIRST_ADDR 0x00 | ||
| 162 | #define CKLED2001_LED_PWM_LAST_ADDR 0xBF | ||
| 163 | #define CKLED2001_LED_PWM_LENGTH 0xC0 | ||
| 164 | |||
| 165 | // Current Tune Registers | ||
| 166 | #define CKLED2001_LED_CURRENT_TUNE_FIRST_ADDR 0x00 | ||
| 167 | #define CKLED2001_LED_CURRENT_TUNE_LAST_ADDR 0x0B | ||
| 168 | #define CKLED2001_LED_CURRENT_TUNE_LENGTH 0x0C | ||
| 169 | |||
| 170 | #define A_1 0x00 | ||
| 171 | #define A_2 0x01 | ||
| 172 | #define A_3 0x02 | ||
| 173 | #define A_4 0x03 | ||
| 174 | #define A_5 0x04 | ||
| 175 | #define A_6 0x05 | ||
| 176 | #define A_7 0x06 | ||
| 177 | #define A_8 0x07 | ||
| 178 | #define A_9 0x08 | ||
| 179 | #define A_10 0x09 | ||
| 180 | #define A_11 0x0A | ||
| 181 | #define A_12 0x0B | ||
| 182 | #define A_13 0x0C | ||
| 183 | #define A_14 0x0D | ||
| 184 | #define A_15 0x0E | ||
| 185 | #define A_16 0x0F | ||
| 186 | |||
| 187 | #define B_1 0x10 | ||
| 188 | #define B_2 0x11 | ||
| 189 | #define B_3 0x12 | ||
| 190 | #define B_4 0x13 | ||
| 191 | #define B_5 0x14 | ||
| 192 | #define B_6 0x15 | ||
| 193 | #define B_7 0x16 | ||
| 194 | #define B_8 0x17 | ||
| 195 | #define B_9 0x18 | ||
| 196 | #define B_10 0x19 | ||
| 197 | #define B_11 0x1A | ||
| 198 | #define B_12 0x1B | ||
| 199 | #define B_13 0x1C | ||
| 200 | #define B_14 0x1D | ||
| 201 | #define B_15 0x1E | ||
| 202 | #define B_16 0x1F | ||
| 203 | |||
| 204 | #define C_1 0x20 | ||
| 205 | #define C_2 0x21 | ||
| 206 | #define C_3 0x22 | ||
| 207 | #define C_4 0x23 | ||
| 208 | #define C_5 0x24 | ||
| 209 | #define C_6 0x25 | ||
| 210 | #define C_7 0x26 | ||
| 211 | #define C_8 0x27 | ||
| 212 | #define C_9 0x28 | ||
| 213 | #define C_10 0x29 | ||
| 214 | #define C_11 0x2A | ||
| 215 | #define C_12 0x2B | ||
| 216 | #define C_13 0x2C | ||
| 217 | #define C_14 0x2D | ||
| 218 | #define C_15 0x2E | ||
| 219 | #define C_16 0x2F | ||
| 220 | |||
| 221 | #define D_1 0x30 | ||
| 222 | #define D_2 0x31 | ||
| 223 | #define D_3 0x32 | ||
| 224 | #define D_4 0x33 | ||
| 225 | #define D_5 0x34 | ||
| 226 | #define D_6 0x35 | ||
| 227 | #define D_7 0x36 | ||
| 228 | #define D_8 0x37 | ||
| 229 | #define D_9 0x38 | ||
| 230 | #define D_10 0x39 | ||
| 231 | #define D_11 0x3A | ||
| 232 | #define D_12 0x3B | ||
| 233 | #define D_13 0x3C | ||
| 234 | #define D_14 0x3D | ||
| 235 | #define D_15 0x3E | ||
| 236 | #define D_16 0x3F | ||
| 237 | |||
| 238 | #define E_1 0x40 | ||
| 239 | #define E_2 0x41 | ||
| 240 | #define E_3 0x42 | ||
| 241 | #define E_4 0x43 | ||
| 242 | #define E_5 0x44 | ||
| 243 | #define E_6 0x45 | ||
| 244 | #define E_7 0x46 | ||
| 245 | #define E_8 0x47 | ||
| 246 | #define E_9 0x48 | ||
| 247 | #define E_10 0x49 | ||
| 248 | #define E_11 0x4A | ||
| 249 | #define E_12 0x4B | ||
| 250 | #define E_13 0x4C | ||
| 251 | #define E_14 0x4D | ||
| 252 | #define E_15 0x4E | ||
| 253 | #define E_16 0x4F | ||
| 254 | |||
| 255 | #define F_1 0x50 | ||
| 256 | #define F_2 0x51 | ||
| 257 | #define F_3 0x52 | ||
| 258 | #define F_4 0x53 | ||
| 259 | #define F_5 0x54 | ||
| 260 | #define F_6 0x55 | ||
| 261 | #define F_7 0x56 | ||
| 262 | #define F_8 0x57 | ||
| 263 | #define F_9 0x58 | ||
| 264 | #define F_10 0x59 | ||
| 265 | #define F_11 0x5A | ||
| 266 | #define F_12 0x5B | ||
| 267 | #define F_13 0x5C | ||
| 268 | #define F_14 0x5D | ||
| 269 | #define F_15 0x5E | ||
| 270 | #define F_16 0x5F | ||
| 271 | |||
| 272 | #define G_1 0x60 | ||
| 273 | #define G_2 0x61 | ||
| 274 | #define G_3 0x62 | ||
| 275 | #define G_4 0x63 | ||
| 276 | #define G_5 0x64 | ||
| 277 | #define G_6 0x65 | ||
| 278 | #define G_7 0x66 | ||
| 279 | #define G_8 0x67 | ||
| 280 | #define G_9 0x68 | ||
| 281 | #define G_10 0x69 | ||
| 282 | #define G_11 0x6A | ||
| 283 | #define G_12 0x6B | ||
| 284 | #define G_13 0x6C | ||
| 285 | #define G_14 0x6D | ||
| 286 | #define G_15 0x6E | ||
| 287 | #define G_16 0x6F | ||
| 288 | |||
| 289 | #define H_1 0x70 | ||
| 290 | #define H_2 0x71 | ||
| 291 | #define H_3 0x72 | ||
| 292 | #define H_4 0x73 | ||
| 293 | #define H_5 0x74 | ||
| 294 | #define H_6 0x75 | ||
| 295 | #define H_7 0x76 | ||
| 296 | #define H_8 0x77 | ||
| 297 | #define H_9 0x78 | ||
| 298 | #define H_10 0x79 | ||
| 299 | #define H_11 0x7A | ||
| 300 | #define H_12 0x7B | ||
| 301 | #define H_13 0x7C | ||
| 302 | #define H_14 0x7D | ||
| 303 | #define H_15 0x7E | ||
| 304 | #define H_16 0x7F | ||
| 305 | |||
| 306 | #define I_1 0x80 | ||
| 307 | #define I_2 0x81 | ||
| 308 | #define I_3 0x82 | ||
| 309 | #define I_4 0x83 | ||
| 310 | #define I_5 0x84 | ||
| 311 | #define I_6 0x85 | ||
| 312 | #define I_7 0x86 | ||
| 313 | #define I_8 0x87 | ||
| 314 | #define I_9 0x88 | ||
| 315 | #define I_10 0x89 | ||
| 316 | #define I_11 0x8A | ||
| 317 | #define I_12 0x8B | ||
| 318 | #define I_13 0x8C | ||
| 319 | #define I_14 0x8D | ||
| 320 | #define I_15 0x8E | ||
| 321 | #define I_16 0x8F | ||
| 322 | |||
| 323 | #define J_1 0x90 | ||
| 324 | #define J_2 0x91 | ||
| 325 | #define J_3 0x92 | ||
| 326 | #define J_4 0x93 | ||
| 327 | #define J_5 0x94 | ||
| 328 | #define J_6 0x95 | ||
| 329 | #define J_7 0x96 | ||
| 330 | #define J_8 0x97 | ||
| 331 | #define J_9 0x98 | ||
| 332 | #define J_10 0x99 | ||
| 333 | #define J_11 0x9A | ||
| 334 | #define J_12 0x9B | ||
| 335 | #define J_13 0x9C | ||
| 336 | #define J_14 0x9D | ||
| 337 | #define J_15 0x9E | ||
| 338 | #define J_16 0x9F | ||
| 339 | |||
| 340 | #define K_1 0xA0 | ||
| 341 | #define K_2 0xA1 | ||
| 342 | #define K_3 0xA2 | ||
| 343 | #define K_4 0xA3 | ||
| 344 | #define K_5 0xA4 | ||
| 345 | #define K_6 0xA5 | ||
| 346 | #define K_7 0xA6 | ||
| 347 | #define K_8 0xA7 | ||
| 348 | #define K_9 0xA8 | ||
| 349 | #define K_10 0xA9 | ||
| 350 | #define K_11 0xAA | ||
| 351 | #define K_12 0xAB | ||
| 352 | #define K_13 0xAC | ||
| 353 | #define K_14 0xAD | ||
| 354 | #define K_15 0xAE | ||
| 355 | #define K_16 0xAF | ||
| 356 | |||
| 357 | #define L_1 0xB0 | ||
| 358 | #define L_2 0xB1 | ||
| 359 | #define L_3 0xB2 | ||
| 360 | #define L_4 0xB3 | ||
| 361 | #define L_5 0xB4 | ||
| 362 | #define L_6 0xB5 | ||
| 363 | #define L_7 0xB6 | ||
| 364 | #define L_8 0xB7 | ||
| 365 | #define L_9 0xB8 | ||
| 366 | #define L_10 0xB9 | ||
| 367 | #define L_11 0xBA | ||
| 368 | #define L_12 0xBB | ||
| 369 | #define L_13 0xBC | ||
| 370 | #define L_14 0xBD | ||
| 371 | #define L_15 0xBE | ||
| 372 | #define L_16 0xBF | ||
diff --git a/drivers/led/snled27351-simple.c b/drivers/led/snled27351-simple.c new file mode 100644 index 0000000000..499769555c --- /dev/null +++ b/drivers/led/snled27351-simple.c | |||
| @@ -0,0 +1,220 @@ | |||
| 1 | /* Copyright 2021 @ Keychron (https://www.keychron.com) | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include "snled27351-simple.h" | ||
| 18 | #include "i2c_master.h" | ||
| 19 | |||
| 20 | #ifndef SNLED27351_I2C_TIMEOUT | ||
| 21 | # define SNLED27351_I2C_TIMEOUT 100 | ||
| 22 | #endif | ||
| 23 | |||
| 24 | #ifndef SNLED27351_I2C_PERSISTENCE | ||
| 25 | # define SNLED27351_I2C_PERSISTENCE 0 | ||
| 26 | #endif | ||
| 27 | |||
| 28 | #ifndef SNLED27351_PHASE_CHANNEL | ||
| 29 | # define SNLED27351_PHASE_CHANNEL SNLED27351_MSKPHASE_12CHANNEL | ||
| 30 | #endif | ||
| 31 | |||
| 32 | #ifndef SNLED27351_CURRENT_TUNE | ||
| 33 | # define SNLED27351_CURRENT_TUNE \ | ||
| 34 | { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF } | ||
| 35 | #endif | ||
| 36 | |||
| 37 | // Transfer buffer for TWITransmitData() | ||
| 38 | uint8_t g_twi_transfer_buffer[20]; | ||
| 39 | |||
| 40 | // These buffers match the SNLED27351 PWM registers. | ||
| 41 | // The control buffers match the PG0 LED On/Off registers. | ||
| 42 | // Storing them like this is optimal for I2C transfers to the registers. | ||
| 43 | // We could optimize this and take out the unused registers from these | ||
| 44 | // buffers and the transfers in snled27351_write_pwm_buffer() but it's | ||
| 45 | // probably not worth the extra complexity. | ||
| 46 | uint8_t g_pwm_buffer[SNLED27351_DRIVER_COUNT][192]; | ||
| 47 | bool g_pwm_buffer_update_required[SNLED27351_DRIVER_COUNT] = {false}; | ||
| 48 | |||
| 49 | uint8_t g_led_control_registers[SNLED27351_DRIVER_COUNT][24] = {0}; | ||
| 50 | bool g_led_control_registers_update_required[SNLED27351_DRIVER_COUNT] = {false}; | ||
| 51 | |||
| 52 | bool snled27351_write_register(uint8_t addr, uint8_t reg, uint8_t data) { | ||
| 53 | // If the transaction fails function returns false. | ||
| 54 | g_twi_transfer_buffer[0] = reg; | ||
| 55 | g_twi_transfer_buffer[1] = data; | ||
| 56 | |||
| 57 | #if SNLED27351_I2C_PERSISTENCE > 0 | ||
| 58 | for (uint8_t i = 0; i < SNLED27351_I2C_PERSISTENCE; i++) { | ||
| 59 | if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, SNLED27351_I2C_TIMEOUT) != 0) { | ||
| 60 | return false; | ||
| 61 | } | ||
| 62 | } | ||
| 63 | #else | ||
| 64 | if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, SNLED27351_I2C_TIMEOUT) != 0) { | ||
| 65 | return false; | ||
| 66 | } | ||
| 67 | #endif | ||
| 68 | return true; | ||
| 69 | } | ||
| 70 | |||
| 71 | bool snled27351_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) { | ||
| 72 | // Assumes PG1 is already selected. | ||
| 73 | // If any of the transactions fails function returns false. | ||
| 74 | // Transmit PWM registers in 12 transfers of 16 bytes. | ||
| 75 | // g_twi_transfer_buffer[] is 20 bytes | ||
| 76 | |||
| 77 | // Iterate over the pwm_buffer contents at 16 byte intervals. | ||
| 78 | for (int i = 0; i < 192; i += 16) { | ||
| 79 | g_twi_transfer_buffer[0] = i; | ||
| 80 | // Copy the data from i to i+15. | ||
| 81 | // Device will auto-increment register for data after the first byte | ||
| 82 | // Thus this sets registers 0x00-0x0F, 0x10-0x1F, etc. in one transfer. | ||
| 83 | for (int j = 0; j < 16; j++) { | ||
| 84 | g_twi_transfer_buffer[1 + j] = pwm_buffer[i + j]; | ||
| 85 | } | ||
| 86 | |||
| 87 | #if SNLED27351_I2C_PERSISTENCE > 0 | ||
| 88 | for (uint8_t i = 0; i < SNLED27351_I2C_PERSISTENCE; i++) { | ||
| 89 | if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, SNLED27351_I2C_TIMEOUT) != 0) { | ||
| 90 | return false; | ||
| 91 | } | ||
| 92 | } | ||
| 93 | #else | ||
| 94 | if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, SNLED27351_I2C_TIMEOUT) != 0) { | ||
| 95 | return false; | ||
| 96 | } | ||
| 97 | #endif | ||
| 98 | } | ||
| 99 | return true; | ||
| 100 | } | ||
| 101 | |||
| 102 | void snled27351_init(uint8_t addr) { | ||
| 103 | // Select to function page | ||
| 104 | snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_FUNCTION_PAGE); | ||
| 105 | // Setting LED driver to shutdown mode | ||
| 106 | snled27351_write_register(addr, SNLED27351_REG_CONFIGURATION, SNLED27351_MSKSW_SHUT_DOWN_MODE); | ||
| 107 | // Setting internal channel pulldown/pullup | ||
| 108 | snled27351_write_register(addr, SNLED27351_REG_PDU, SNLED27351_MSKSET_CA_CB_CHANNEL); | ||
| 109 | // Select number of scan phase | ||
| 110 | snled27351_write_register(addr, SNLED27351_REG_SCAN_PHASE, SNLED27351_PHASE_CHANNEL); | ||
| 111 | // Setting PWM Delay Phase | ||
| 112 | snled27351_write_register(addr, SNLED27351_REG_SLEW_RATE_CONTROL_MODE1, SNLED27351_MSKPWM_DELAY_PHASE_ENABLE); | ||
| 113 | // Setting Driving/Sinking Channel Slew Rate | ||
| 114 | snled27351_write_register(addr, SNLED27351_REG_SLEW_RATE_CONTROL_MODE2, SNLED27351_MSKDRIVING_SINKING_CHANNEL_SLEWRATE_ENABLE); | ||
| 115 | // Setting Iref | ||
| 116 | snled27351_write_register(addr, SNLED27351_REG_SOFTWARE_SLEEP, SNLED27351_MSKSLEEP_DISABLE); | ||
| 117 | // Set LED CONTROL PAGE (Page 0) | ||
| 118 | snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_LED_CONTROL_PAGE); | ||
| 119 | for (int i = 0; i < SNLED27351_LED_CONTROL_ON_OFF_LENGTH; i++) { | ||
| 120 | snled27351_write_register(addr, i, 0x00); | ||
| 121 | } | ||
| 122 | |||
| 123 | // Set PWM PAGE (Page 1) | ||
| 124 | snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_LED_PWM_PAGE); | ||
| 125 | for (int i = 0; i < SNLED27351_LED_CURRENT_TUNE_LENGTH; i++) { | ||
| 126 | snled27351_write_register(addr, i, 0x00); | ||
| 127 | } | ||
| 128 | |||
| 129 | // Set CURRENT PAGE (Page 4) | ||
| 130 | uint8_t current_tune_reg_list[SNLED27351_LED_CURRENT_TUNE_LENGTH] = SNLED27351_CURRENT_TUNE; | ||
| 131 | snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_CURRENT_TUNE_PAGE); | ||
| 132 | for (int i = 0; i < SNLED27351_LED_CURRENT_TUNE_LENGTH; i++) { | ||
| 133 | snled27351_write_register(addr, i, current_tune_reg_list[i]); | ||
| 134 | } | ||
| 135 | |||
| 136 | // Enable LEDs ON/OFF | ||
| 137 | snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_LED_CONTROL_PAGE); | ||
| 138 | for (int i = 0; i < SNLED27351_LED_CONTROL_ON_OFF_LENGTH; i++) { | ||
| 139 | snled27351_write_register(addr, i, 0xFF); | ||
| 140 | } | ||
| 141 | |||
| 142 | // Select to function page | ||
| 143 | snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_FUNCTION_PAGE); | ||
| 144 | // Setting LED driver to normal mode | ||
| 145 | snled27351_write_register(addr, SNLED27351_REG_CONFIGURATION, SNLED27351_MSKSW_NORMAL_MODE); | ||
| 146 | } | ||
| 147 | |||
| 148 | void snled27351_set_value(int index, uint8_t value) { | ||
| 149 | snled27351_led_t led; | ||
| 150 | if (index >= 0 && index < LED_MATRIX_LED_COUNT) { | ||
| 151 | memcpy_P(&led, (&g_snled27351_leds[index]), sizeof(led)); | ||
| 152 | |||
| 153 | if (g_pwm_buffer[led.driver][led.v] == value) { | ||
| 154 | return; | ||
| 155 | } | ||
| 156 | g_pwm_buffer[led.driver][led.v] = value; | ||
| 157 | g_pwm_buffer_update_required[led.driver] = true; | ||
| 158 | } | ||
| 159 | } | ||
| 160 | |||
| 161 | void snled27351_set_value_all(uint8_t value) { | ||
| 162 | for (int i = 0; i < LED_MATRIX_LED_COUNT; i++) { | ||
| 163 | snled27351_set_value(i, value); | ||
| 164 | } | ||
| 165 | } | ||
| 166 | |||
| 167 | void snled27351_set_led_control_register(uint8_t index, bool value) { | ||
| 168 | snled27351_led_t led; | ||
| 169 | memcpy_P(&led, (&g_snled27351_leds[index]), sizeof(led)); | ||
| 170 | |||
| 171 | uint8_t control_register = led.v / 8; | ||
| 172 | uint8_t bit_value = led.v % 8; | ||
| 173 | |||
| 174 | if (value) { | ||
| 175 | g_led_control_registers[led.driver][control_register] |= (1 << bit_value); | ||
| 176 | } else { | ||
| 177 | g_led_control_registers[led.driver][control_register] &= ~(1 << bit_value); | ||
| 178 | } | ||
| 179 | |||
| 180 | g_led_control_registers_update_required[led.driver] = true; | ||
| 181 | } | ||
| 182 | |||
| 183 | void snled27351_update_pwm_buffers(uint8_t addr, uint8_t index) { | ||
| 184 | if (g_pwm_buffer_update_required[index]) { | ||
| 185 | snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_LED_PWM_PAGE); | ||
| 186 | |||
| 187 | // If any of the transactions fail we risk writing dirty PG0, | ||
| 188 | // refresh page 0 just in case. | ||
| 189 | if (!snled27351_write_pwm_buffer(addr, g_pwm_buffer[index])) { | ||
| 190 | g_led_control_registers_update_required[index] = true; | ||
| 191 | } | ||
| 192 | } | ||
| 193 | g_pwm_buffer_update_required[index] = false; | ||
| 194 | } | ||
| 195 | |||
| 196 | void snled27351_update_led_control_registers(uint8_t addr, uint8_t index) { | ||
| 197 | if (g_led_control_registers_update_required[index]) { | ||
| 198 | snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_LED_CONTROL_PAGE); | ||
| 199 | for (int i = 0; i < 24; i++) { | ||
| 200 | snled27351_write_register(addr, i, g_led_control_registers[index][i]); | ||
| 201 | } | ||
| 202 | } | ||
| 203 | g_led_control_registers_update_required[index] = false; | ||
| 204 | } | ||
| 205 | |||
| 206 | void snled27351_sw_return_normal(uint8_t addr) { | ||
| 207 | // Select to function page | ||
| 208 | snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_FUNCTION_PAGE); | ||
| 209 | // Setting LED driver to normal mode | ||
| 210 | snled27351_write_register(addr, SNLED27351_REG_CONFIGURATION, SNLED27351_MSKSW_NORMAL_MODE); | ||
| 211 | } | ||
| 212 | |||
| 213 | void snled27351_sw_shutdown(uint8_t addr) { | ||
| 214 | // Select to function page | ||
| 215 | snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_FUNCTION_PAGE); | ||
| 216 | // Setting LED driver to shutdown mode | ||
| 217 | snled27351_write_register(addr, SNLED27351_REG_CONFIGURATION, SNLED27351_MSKSW_SHUT_DOWN_MODE); | ||
| 218 | // Write SW Sleep Register | ||
| 219 | snled27351_write_register(addr, SNLED27351_REG_SOFTWARE_SLEEP, SNLED27351_MSKSLEEP_ENABLE); | ||
| 220 | } | ||
diff --git a/drivers/led/snled27351-simple.h b/drivers/led/snled27351-simple.h new file mode 100644 index 0000000000..ff71b44b91 --- /dev/null +++ b/drivers/led/snled27351-simple.h | |||
| @@ -0,0 +1,376 @@ | |||
| 1 | /* Copyright 2021 @ Keychron (https://www.keychron.com) | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #pragma once | ||
| 18 | |||
| 19 | #include <stdint.h> | ||
| 20 | #include <stdbool.h> | ||
| 21 | #include "progmem.h" | ||
| 22 | |||
| 23 | // ======== DEPRECATED DEFINES - DO NOT USE ======== | ||
| 24 | #ifdef DRIVER_COUNT | ||
| 25 | # define SNLED27351_DRIVER_COUNT DRIVER_COUNT | ||
| 26 | #endif | ||
| 27 | #ifdef CKLED2001_TIMEOUT | ||
| 28 | # define SNLED27351_I2C_TIMEOUT CKLED2001_TIMEOUT | ||
| 29 | #endif | ||
| 30 | #ifdef CKLED2001_PERSISTENCE | ||
| 31 | # define SNLED27351_I2C_PERSISTENCE CKLED2001_PERSISTENCE | ||
| 32 | #endif | ||
| 33 | #ifdef PHASE_CHANNEL | ||
| 34 | # define SNLED27351_PHASE_CHANNEL PHASE_CHANNEL | ||
| 35 | #endif | ||
| 36 | #ifdef CKLED2001_CURRENT_TUNE | ||
| 37 | # define SNLED27351_CURRENT_TUNE CKLED2001_CURRENT_TUNE | ||
| 38 | #endif | ||
| 39 | |||
| 40 | #define MSKPHASE_12CHANNEL SNLED27351_MSKPHASE_12CHANNEL | ||
| 41 | #define MSKPHASE_11CHANNEL SNLED27351_MSKPHASE_11CHANNEL | ||
| 42 | #define MSKPHASE_10CHANNEL SNLED27351_MSKPHASE_10CHANNEL | ||
| 43 | #define MSKPHASE_9CHANNEL SNLED27351_MSKPHASE_9CHANNEL | ||
| 44 | #define MSKPHASE_8CHANNEL SNLED27351_MSKPHASE_8CHANNEL | ||
| 45 | #define MSKPHASE_7CHANNEL SNLED27351_MSKPHASE_7CHANNEL | ||
| 46 | #define MSKPHASE_6CHANNEL SNLED27351_MSKPHASE_6CHANNEL | ||
| 47 | #define MSKPHASE_5CHANNEL SNLED27351_MSKPHASE_5CHANNEL | ||
| 48 | #define MSKPHASE_4CHANNEL SNLED27351_MSKPHASE_4CHANNEL | ||
| 49 | #define MSKPHASE_3CHANNEL SNLED27351_MSKPHASE_3CHANNEL | ||
| 50 | #define MSKPHASE_2CHANNEL SNLED27351_MSKPHASE_2CHANNEL | ||
| 51 | #define MSKPHASE_1CHANNEL SNLED27351_MSKPHASE_1CHANNEL | ||
| 52 | |||
| 53 | #define ckled2001_led snled27351_led_t | ||
| 54 | #define g_ckled2001_leds g_snled27351_leds | ||
| 55 | // ======== | ||
| 56 | |||
| 57 | #define SNLED27351_I2C_ADDRESS_GND 0x74 | ||
| 58 | #define SNLED27351_I2C_ADDRESS_SCL 0x75 | ||
| 59 | #define SNLED27351_I2C_ADDRESS_SDA 0x76 | ||
| 60 | #define SNLED27351_I2C_ADDRESS_VDDIO 0x77 | ||
| 61 | |||
| 62 | typedef struct snled27351_led_t { | ||
| 63 | uint8_t driver : 2; | ||
| 64 | uint8_t v; | ||
| 65 | } __attribute__((packed)) snled27351_led_t; | ||
| 66 | |||
| 67 | extern const snled27351_led_t PROGMEM g_snled27351_leds[LED_MATRIX_LED_COUNT]; | ||
| 68 | |||
| 69 | void snled27351_init(uint8_t addr); | ||
| 70 | bool snled27351_write_register(uint8_t addr, uint8_t reg, uint8_t data); | ||
| 71 | bool snled27351_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer); | ||
| 72 | |||
| 73 | void snled27351_set_value(int index, uint8_t value); | ||
| 74 | void snled27351_set_value_all(uint8_t value); | ||
| 75 | |||
| 76 | void snled27351_set_led_control_register(uint8_t index, bool value); | ||
| 77 | |||
| 78 | // This should not be called from an interrupt | ||
| 79 | // (eg. from a timer interrupt). | ||
| 80 | // Call this while idle (in between matrix scans). | ||
| 81 | // If the buffer is dirty, it will update the driver with the buffer. | ||
| 82 | void snled27351_update_pwm_buffers(uint8_t addr, uint8_t index); | ||
| 83 | void snled27351_update_led_control_registers(uint8_t addr, uint8_t index); | ||
| 84 | |||
| 85 | void snled27351_sw_return_normal(uint8_t addr); | ||
| 86 | void snled27351_sw_shutdown(uint8_t addr); | ||
| 87 | |||
| 88 | // Registers Page Define | ||
| 89 | #define SNLED27351_REG_CONFIGURE_CMD_PAGE 0xFD | ||
| 90 | #define SNLED27351_LED_CONTROL_PAGE 0x00 | ||
| 91 | #define SNLED27351_LED_PWM_PAGE 0x01 | ||
| 92 | #define SNLED27351_FUNCTION_PAGE 0x03 | ||
| 93 | #define SNLED27351_CURRENT_TUNE_PAGE 0x04 | ||
| 94 | |||
| 95 | // Function Register: address 0x00 | ||
| 96 | #define SNLED27351_REG_CONFIGURATION 0x00 | ||
| 97 | #define SNLED27351_MSKSW_SHUT_DOWN_MODE (0x0 << 0) | ||
| 98 | #define SNLED27351_MSKSW_NORMAL_MODE (0x1 << 0) | ||
| 99 | |||
| 100 | #define SNLED27351_REG_DRIVER_ID 0x11 | ||
| 101 | #define SNLED27351_DRIVER_ID 0x8A | ||
| 102 | |||
| 103 | #define SNLED27351_REG_PDU 0x13 | ||
| 104 | #define SNLED27351_MSKSET_CA_CB_CHANNEL 0xAA | ||
| 105 | #define SNLED27351_MSKCLR_CA_CB_CHANNEL 0x00 | ||
| 106 | |||
| 107 | #define SNLED27351_REG_SCAN_PHASE 0x14 | ||
| 108 | #define SNLED27351_MSKPHASE_12CHANNEL 0x00 | ||
| 109 | #define SNLED27351_MSKPHASE_11CHANNEL 0x01 | ||
| 110 | #define SNLED27351_MSKPHASE_10CHANNEL 0x02 | ||
| 111 | #define SNLED27351_MSKPHASE_9CHANNEL 0x03 | ||
| 112 | #define SNLED27351_MSKPHASE_8CHANNEL 0x04 | ||
| 113 | #define SNLED27351_MSKPHASE_7CHANNEL 0x05 | ||
| 114 | #define SNLED27351_MSKPHASE_6CHANNEL 0x06 | ||
| 115 | #define SNLED27351_MSKPHASE_5CHANNEL 0x07 | ||
| 116 | #define SNLED27351_MSKPHASE_4CHANNEL 0x08 | ||
| 117 | #define SNLED27351_MSKPHASE_3CHANNEL 0x09 | ||
| 118 | #define SNLED27351_MSKPHASE_2CHANNEL 0x0A | ||
| 119 | #define SNLED27351_MSKPHASE_1CHANNEL 0x0B | ||
| 120 | |||
| 121 | #define SNLED27351_REG_SLEW_RATE_CONTROL_MODE1 0x15 | ||
| 122 | #define SNLED27351_MSKPWM_DELAY_PHASE_ENABLE 0x04 | ||
| 123 | #define SNLED27351_MSKPWM_DELAY_PHASE_DISABLE 0x00 | ||
| 124 | |||
| 125 | #define SNLED27351_REG_SLEW_RATE_CONTROL_MODE2 0x16 | ||
| 126 | #define SNLED27351_MSKDRIVING_SINKING_CHANNEL_SLEWRATE_ENABLE 0xC0 | ||
| 127 | #define SNLED27351_MSKDRIVING_SINKING_CHANNEL_SLEWRATE_DISABLE 0x00 | ||
| 128 | |||
| 129 | #define SNLED27351_REG_OPEN_SHORT_ENABLE 0x17 | ||
| 130 | #define SNLED27351_MSKOPEN_DETECTION_ENABLE (0x01 << 7) | ||
| 131 | #define SNLED27351_MSKOPEN_DETECTION_DISABLE (0x00) | ||
| 132 | |||
| 133 | #define SNLED27351_MSKSHORT_DETECTION_ENABLE (0x01 << 6) | ||
| 134 | #define SNLED27351_MSKSHORT_DETECTION_DISABLE (0x00) | ||
| 135 | |||
| 136 | #define SNLED27351_REG_OPEN_SHORT_DUTY 0x18 | ||
| 137 | #define SNLED27351_REG_OPEN_SHORT_FLAG 0x19 | ||
| 138 | |||
| 139 | #define SNLED27351_MSKOPEN_DETECTION_INTERRUPT_ENABLE (0x01 << 7) | ||
| 140 | #define SNLED27351_MSKOPEN_DETECTION_INTERRUPT_DISABLE (0x00) | ||
| 141 | |||
| 142 | #define SNLED27351_MSKSHORT_DETECTION_INTERRUPT_ENABLE (0x01 << 6) | ||
| 143 | #define SNLED27351_MSKSHORT_DETECTION_INTERRUPT_DISABLE (0x00) | ||
| 144 | |||
| 145 | #define SNLED27351_REG_SOFTWARE_SLEEP 0x1A | ||
| 146 | #define SNLED27351_MSKSLEEP_ENABLE 0x02 | ||
| 147 | #define SNLED27351_MSKSLEEP_DISABLE 0x00 | ||
| 148 | |||
| 149 | // LED Control Registers | ||
| 150 | #define SNLED27351_LED_CONTROL_ON_OFF_FIRST_ADDR 0x0 | ||
| 151 | #define SNLED27351_LED_CONTROL_ON_OFF_LAST_ADDR 0x17 | ||
| 152 | #define SNLED27351_LED_CONTROL_ON_OFF_LENGTH ((SNLED27351_LED_CONTROL_ON_OFF_LAST_ADDR - SNLED27351_LED_CONTROL_ON_OFF_FIRST_ADDR) + 1) | ||
| 153 | |||
| 154 | #define SNLED27351_LED_CONTROL_OPEN_FIRST_ADDR 0x18 | ||
| 155 | #define SNLED27351_LED_CONTROL_OPEN_LAST_ADDR 0x2F | ||
| 156 | #define SNLED27351_LED_CONTROL_OPEN_LENGTH ((SNLED27351_LED_CONTROL_OPEN_LAST_ADDR - SNLED27351_LED_CONTROL_OPEN_FIRST_ADDR) + 1) | ||
| 157 | |||
| 158 | #define SNLED27351_LED_CONTROL_SHORT_FIRST_ADDR 0x30 | ||
| 159 | #define SNLED27351_LED_CONTROL_SHORT_LAST_ADDR 0x47 | ||
| 160 | #define SNLED27351_LED_CONTROL_SHORT_LENGTH ((SNLED27351_LED_CONTROL_SHORT_LAST_ADDR - SNLED27351_LED_CONTROL_SHORT_FIRST_ADDR) + 1) | ||
| 161 | |||
| 162 | #define SNLED27351_LED_CONTROL_PAGE_LENGTH 0x48 | ||
| 163 | |||
| 164 | // LED Control Registers | ||
| 165 | #define SNLED27351_LED_PWM_FIRST_ADDR 0x00 | ||
| 166 | #define SNLED27351_LED_PWM_LAST_ADDR 0xBF | ||
| 167 | #define SNLED27351_LED_PWM_LENGTH 0xC0 | ||
| 168 | |||
| 169 | // Current Tune Registers | ||
| 170 | #define SNLED27351_LED_CURRENT_TUNE_FIRST_ADDR 0x00 | ||
| 171 | #define SNLED27351_LED_CURRENT_TUNE_LAST_ADDR 0x0B | ||
| 172 | #define SNLED27351_LED_CURRENT_TUNE_LENGTH 0x0C | ||
| 173 | |||
| 174 | #define A_1 0x00 | ||
| 175 | #define A_2 0x01 | ||
| 176 | #define A_3 0x02 | ||
| 177 | #define A_4 0x03 | ||
| 178 | #define A_5 0x04 | ||
| 179 | #define A_6 0x05 | ||
| 180 | #define A_7 0x06 | ||
| 181 | #define A_8 0x07 | ||
| 182 | #define A_9 0x08 | ||
| 183 | #define A_10 0x09 | ||
| 184 | #define A_11 0x0A | ||
| 185 | #define A_12 0x0B | ||
| 186 | #define A_13 0x0C | ||
| 187 | #define A_14 0x0D | ||
| 188 | #define A_15 0x0E | ||
| 189 | #define A_16 0x0F | ||
| 190 | |||
| 191 | #define B_1 0x10 | ||
| 192 | #define B_2 0x11 | ||
| 193 | #define B_3 0x12 | ||
| 194 | #define B_4 0x13 | ||
| 195 | #define B_5 0x14 | ||
| 196 | #define B_6 0x15 | ||
| 197 | #define B_7 0x16 | ||
| 198 | #define B_8 0x17 | ||
| 199 | #define B_9 0x18 | ||
| 200 | #define B_10 0x19 | ||
| 201 | #define B_11 0x1A | ||
| 202 | #define B_12 0x1B | ||
| 203 | #define B_13 0x1C | ||
| 204 | #define B_14 0x1D | ||
| 205 | #define B_15 0x1E | ||
| 206 | #define B_16 0x1F | ||
| 207 | |||
| 208 | #define C_1 0x20 | ||
| 209 | #define C_2 0x21 | ||
| 210 | #define C_3 0x22 | ||
| 211 | #define C_4 0x23 | ||
| 212 | #define C_5 0x24 | ||
| 213 | #define C_6 0x25 | ||
| 214 | #define C_7 0x26 | ||
| 215 | #define C_8 0x27 | ||
| 216 | #define C_9 0x28 | ||
| 217 | #define C_10 0x29 | ||
| 218 | #define C_11 0x2A | ||
| 219 | #define C_12 0x2B | ||
| 220 | #define C_13 0x2C | ||
| 221 | #define C_14 0x2D | ||
| 222 | #define C_15 0x2E | ||
| 223 | #define C_16 0x2F | ||
| 224 | |||
| 225 | #define D_1 0x30 | ||
| 226 | #define D_2 0x31 | ||
| 227 | #define D_3 0x32 | ||
| 228 | #define D_4 0x33 | ||
| 229 | #define D_5 0x34 | ||
| 230 | #define D_6 0x35 | ||
| 231 | #define D_7 0x36 | ||
| 232 | #define D_8 0x37 | ||
| 233 | #define D_9 0x38 | ||
| 234 | #define D_10 0x39 | ||
| 235 | #define D_11 0x3A | ||
| 236 | #define D_12 0x3B | ||
| 237 | #define D_13 0x3C | ||
| 238 | #define D_14 0x3D | ||
| 239 | #define D_15 0x3E | ||
| 240 | #define D_16 0x3F | ||
| 241 | |||
| 242 | #define E_1 0x40 | ||
| 243 | #define E_2 0x41 | ||
| 244 | #define E_3 0x42 | ||
| 245 | #define E_4 0x43 | ||
| 246 | #define E_5 0x44 | ||
| 247 | #define E_6 0x45 | ||
| 248 | #define E_7 0x46 | ||
| 249 | #define E_8 0x47 | ||
| 250 | #define E_9 0x48 | ||
| 251 | #define E_10 0x49 | ||
| 252 | #define E_11 0x4A | ||
| 253 | #define E_12 0x4B | ||
| 254 | #define E_13 0x4C | ||
| 255 | #define E_14 0x4D | ||
| 256 | #define E_15 0x4E | ||
| 257 | #define E_16 0x4F | ||
| 258 | |||
| 259 | #define F_1 0x50 | ||
| 260 | #define F_2 0x51 | ||
| 261 | #define F_3 0x52 | ||
| 262 | #define F_4 0x53 | ||
| 263 | #define F_5 0x54 | ||
| 264 | #define F_6 0x55 | ||
| 265 | #define F_7 0x56 | ||
| 266 | #define F_8 0x57 | ||
| 267 | #define F_9 0x58 | ||
| 268 | #define F_10 0x59 | ||
| 269 | #define F_11 0x5A | ||
| 270 | #define F_12 0x5B | ||
| 271 | #define F_13 0x5C | ||
| 272 | #define F_14 0x5D | ||
| 273 | #define F_15 0x5E | ||
| 274 | #define F_16 0x5F | ||
| 275 | |||
| 276 | #define G_1 0x60 | ||
| 277 | #define G_2 0x61 | ||
| 278 | #define G_3 0x62 | ||
| 279 | #define G_4 0x63 | ||
| 280 | #define G_5 0x64 | ||
| 281 | #define G_6 0x65 | ||
| 282 | #define G_7 0x66 | ||
| 283 | #define G_8 0x67 | ||
| 284 | #define G_9 0x68 | ||
| 285 | #define G_10 0x69 | ||
| 286 | #define G_11 0x6A | ||
| 287 | #define G_12 0x6B | ||
| 288 | #define G_13 0x6C | ||
| 289 | #define G_14 0x6D | ||
| 290 | #define G_15 0x6E | ||
| 291 | #define G_16 0x6F | ||
| 292 | |||
| 293 | #define H_1 0x70 | ||
| 294 | #define H_2 0x71 | ||
| 295 | #define H_3 0x72 | ||
| 296 | #define H_4 0x73 | ||
| 297 | #define H_5 0x74 | ||
| 298 | #define H_6 0x75 | ||
| 299 | #define H_7 0x76 | ||
| 300 | #define H_8 0x77 | ||
| 301 | #define H_9 0x78 | ||
| 302 | #define H_10 0x79 | ||
| 303 | #define H_11 0x7A | ||
| 304 | #define H_12 0x7B | ||
| 305 | #define H_13 0x7C | ||
| 306 | #define H_14 0x7D | ||
| 307 | #define H_15 0x7E | ||
| 308 | #define H_16 0x7F | ||
| 309 | |||
| 310 | #define I_1 0x80 | ||
| 311 | #define I_2 0x81 | ||
| 312 | #define I_3 0x82 | ||
| 313 | #define I_4 0x83 | ||
| 314 | #define I_5 0x84 | ||
| 315 | #define I_6 0x85 | ||
| 316 | #define I_7 0x86 | ||
| 317 | #define I_8 0x87 | ||
| 318 | #define I_9 0x88 | ||
| 319 | #define I_10 0x89 | ||
| 320 | #define I_11 0x8A | ||
| 321 | #define I_12 0x8B | ||
| 322 | #define I_13 0x8C | ||
| 323 | #define I_14 0x8D | ||
| 324 | #define I_15 0x8E | ||
| 325 | #define I_16 0x8F | ||
| 326 | |||
| 327 | #define J_1 0x90 | ||
| 328 | #define J_2 0x91 | ||
| 329 | #define J_3 0x92 | ||
| 330 | #define J_4 0x93 | ||
| 331 | #define J_5 0x94 | ||
| 332 | #define J_6 0x95 | ||
| 333 | #define J_7 0x96 | ||
| 334 | #define J_8 0x97 | ||
| 335 | #define J_9 0x98 | ||
| 336 | #define J_10 0x99 | ||
| 337 | #define J_11 0x9A | ||
| 338 | #define J_12 0x9B | ||
| 339 | #define J_13 0x9C | ||
| 340 | #define J_14 0x9D | ||
| 341 | #define J_15 0x9E | ||
| 342 | #define J_16 0x9F | ||
| 343 | |||
| 344 | #define K_1 0xA0 | ||
| 345 | #define K_2 0xA1 | ||
| 346 | #define K_3 0xA2 | ||
| 347 | #define K_4 0xA3 | ||
| 348 | #define K_5 0xA4 | ||
| 349 | #define K_6 0xA5 | ||
| 350 | #define K_7 0xA6 | ||
| 351 | #define K_8 0xA7 | ||
| 352 | #define K_9 0xA8 | ||
| 353 | #define K_10 0xA9 | ||
| 354 | #define K_11 0xAA | ||
| 355 | #define K_12 0xAB | ||
| 356 | #define K_13 0xAC | ||
| 357 | #define K_14 0xAD | ||
| 358 | #define K_15 0xAE | ||
| 359 | #define K_16 0xAF | ||
| 360 | |||
| 361 | #define L_1 0xB0 | ||
| 362 | #define L_2 0xB1 | ||
| 363 | #define L_3 0xB2 | ||
| 364 | #define L_4 0xB3 | ||
| 365 | #define L_5 0xB4 | ||
| 366 | #define L_6 0xB5 | ||
| 367 | #define L_7 0xB6 | ||
| 368 | #define L_8 0xB7 | ||
| 369 | #define L_9 0xB8 | ||
| 370 | #define L_10 0xB9 | ||
| 371 | #define L_11 0xBA | ||
| 372 | #define L_12 0xBB | ||
| 373 | #define L_13 0xBC | ||
| 374 | #define L_14 0xBD | ||
| 375 | #define L_15 0xBE | ||
| 376 | #define L_16 0xBF | ||
diff --git a/drivers/led/snled27351.c b/drivers/led/snled27351.c new file mode 100644 index 0000000000..1ca691b30f --- /dev/null +++ b/drivers/led/snled27351.c | |||
| @@ -0,0 +1,235 @@ | |||
| 1 | /* Copyright 2021 @ Keychron (https://www.keychron.com) | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include "snled27351.h" | ||
| 18 | #include "i2c_master.h" | ||
| 19 | |||
| 20 | #ifndef SNLED27351_I2C_TIMEOUT | ||
| 21 | # define SNLED27351_I2C_TIMEOUT 100 | ||
| 22 | #endif | ||
| 23 | |||
| 24 | #ifndef SNLED27351_I2C_PERSISTENCE | ||
| 25 | # define SNLED27351_I2C_PERSISTENCE 0 | ||
| 26 | #endif | ||
| 27 | |||
| 28 | #ifndef SNLED27351_PHASE_CHANNEL | ||
| 29 | # define SNLED27351_PHASE_CHANNEL SNLED27351_MSKPHASE_12CHANNEL | ||
| 30 | #endif | ||
| 31 | |||
| 32 | #ifndef SNLED27351_CURRENT_TUNE | ||
| 33 | # define SNLED27351_CURRENT_TUNE \ | ||
| 34 | { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF } | ||
| 35 | #endif | ||
| 36 | |||
| 37 | // Transfer buffer for TWITransmitData() | ||
| 38 | uint8_t g_twi_transfer_buffer[65]; | ||
| 39 | |||
| 40 | // These buffers match the SNLED27351 PWM registers. | ||
| 41 | // The control buffers match the PG0 LED On/Off registers. | ||
| 42 | // Storing them like this is optimal for I2C transfers to the registers. | ||
| 43 | // We could optimize this and take out the unused registers from these | ||
| 44 | // buffers and the transfers in snled27351_write_pwm_buffer() but it's | ||
| 45 | // probably not worth the extra complexity. | ||
| 46 | uint8_t g_pwm_buffer[SNLED27351_DRIVER_COUNT][192]; | ||
| 47 | bool g_pwm_buffer_update_required[SNLED27351_DRIVER_COUNT] = {false}; | ||
| 48 | |||
| 49 | uint8_t g_led_control_registers[SNLED27351_DRIVER_COUNT][24] = {0}; | ||
| 50 | bool g_led_control_registers_update_required[SNLED27351_DRIVER_COUNT] = {false}; | ||
| 51 | |||
| 52 | bool snled27351_write_register(uint8_t addr, uint8_t reg, uint8_t data) { | ||
| 53 | // If the transaction fails function returns false. | ||
| 54 | g_twi_transfer_buffer[0] = reg; | ||
| 55 | g_twi_transfer_buffer[1] = data; | ||
| 56 | |||
| 57 | #if SNLED27351_I2C_PERSISTENCE > 0 | ||
| 58 | for (uint8_t i = 0; i < SNLED27351_I2C_PERSISTENCE; i++) { | ||
| 59 | if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, SNLED27351_I2C_TIMEOUT) != 0) { | ||
| 60 | return false; | ||
| 61 | } | ||
| 62 | } | ||
| 63 | #else | ||
| 64 | if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, SNLED27351_I2C_TIMEOUT) != 0) { | ||
| 65 | return false; | ||
| 66 | } | ||
| 67 | #endif | ||
| 68 | return true; | ||
| 69 | } | ||
| 70 | |||
| 71 | bool snled27351_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) { | ||
| 72 | // Assumes PG1 is already selected. | ||
| 73 | // If any of the transactions fails function returns false. | ||
| 74 | // Transmit PWM registers in 3 transfers of 64 bytes. | ||
| 75 | |||
| 76 | // Iterate over the pwm_buffer contents at 64 byte intervals. | ||
| 77 | for (uint8_t i = 0; i < 192; i += 64) { | ||
| 78 | g_twi_transfer_buffer[0] = i; | ||
| 79 | // Copy the data from i to i+63. | ||
| 80 | // Device will auto-increment register for data after the first byte | ||
| 81 | // Thus this sets registers 0x00-0x0F, 0x10-0x1F, etc. in one transfer. | ||
| 82 | for (uint8_t j = 0; j < 64; j++) { | ||
| 83 | g_twi_transfer_buffer[1 + j] = pwm_buffer[i + j]; | ||
| 84 | } | ||
| 85 | |||
| 86 | #if SNLED27351_I2C_PERSISTENCE > 0 | ||
| 87 | for (uint8_t i = 0; i < SNLED27351_I2C_PERSISTENCE; i++) { | ||
| 88 | if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 65, SNLED27351_I2C_TIMEOUT) != 0) { | ||
| 89 | return false; | ||
| 90 | } | ||
| 91 | } | ||
| 92 | #else | ||
| 93 | if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 65, SNLED27351_I2C_TIMEOUT) != 0) { | ||
| 94 | return false; | ||
| 95 | } | ||
| 96 | #endif | ||
| 97 | } | ||
| 98 | return true; | ||
| 99 | } | ||
| 100 | |||
| 101 | void snled27351_init(uint8_t addr) { | ||
| 102 | // Select to function page | ||
| 103 | snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_FUNCTION_PAGE); | ||
| 104 | // Setting LED driver to shutdown mode | ||
| 105 | snled27351_write_register(addr, SNLED27351_REG_CONFIGURATION, SNLED27351_MSKSW_SHUT_DOWN_MODE); | ||
| 106 | // Setting internal channel pulldown/pullup | ||
| 107 | snled27351_write_register(addr, SNLED27351_REG_PDU, SNLED27351_MSKSET_CA_CB_CHANNEL); | ||
| 108 | // Select number of scan phase | ||
| 109 | snled27351_write_register(addr, SNLED27351_REG_SCAN_PHASE, SNLED27351_PHASE_CHANNEL); | ||
| 110 | // Setting PWM Delay Phase | ||
| 111 | snled27351_write_register(addr, SNLED27351_REG_SLEW_RATE_CONTROL_MODE1, SNLED27351_MSKPWM_DELAY_PHASE_ENABLE); | ||
| 112 | // Setting Driving/Sinking Channel Slew Rate | ||
| 113 | snled27351_write_register(addr, SNLED27351_REG_SLEW_RATE_CONTROL_MODE2, SNLED27351_MSKDRIVING_SINKING_CHANNEL_SLEWRATE_ENABLE); | ||
| 114 | // Setting Iref | ||
| 115 | snled27351_write_register(addr, SNLED27351_REG_SOFTWARE_SLEEP, SNLED27351_MSKSLEEP_DISABLE); | ||
| 116 | // Set LED CONTROL PAGE (Page 0) | ||
| 117 | snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_LED_CONTROL_PAGE); | ||
| 118 | for (int i = 0; i < SNLED27351_LED_CONTROL_ON_OFF_LENGTH; i++) { | ||
| 119 | snled27351_write_register(addr, i, 0x00); | ||
| 120 | } | ||
| 121 | |||
| 122 | // Set PWM PAGE (Page 1) | ||
| 123 | snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_LED_PWM_PAGE); | ||
| 124 | for (int i = 0; i < SNLED27351_LED_CURRENT_TUNE_LENGTH; i++) { | ||
| 125 | snled27351_write_register(addr, i, 0x00); | ||
| 126 | } | ||
| 127 | |||
| 128 | // Set CURRENT PAGE (Page 4) | ||
| 129 | uint8_t current_tune_reg_list[SNLED27351_LED_CURRENT_TUNE_LENGTH] = SNLED27351_CURRENT_TUNE; | ||
| 130 | snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_CURRENT_TUNE_PAGE); | ||
| 131 | for (int i = 0; i < SNLED27351_LED_CURRENT_TUNE_LENGTH; i++) { | ||
| 132 | snled27351_write_register(addr, i, current_tune_reg_list[i]); | ||
| 133 | } | ||
| 134 | |||
| 135 | // Enable LEDs ON/OFF | ||
| 136 | snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_LED_CONTROL_PAGE); | ||
| 137 | for (int i = 0; i < SNLED27351_LED_CONTROL_ON_OFF_LENGTH; i++) { | ||
| 138 | snled27351_write_register(addr, i, 0xFF); | ||
| 139 | } | ||
| 140 | |||
| 141 | // Select to function page | ||
| 142 | snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_FUNCTION_PAGE); | ||
| 143 | // Setting LED driver to normal mode | ||
| 144 | snled27351_write_register(addr, SNLED27351_REG_CONFIGURATION, SNLED27351_MSKSW_NORMAL_MODE); | ||
| 145 | } | ||
| 146 | |||
| 147 | void snled27351_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { | ||
| 148 | snled27351_led_t led; | ||
| 149 | if (index >= 0 && index < RGB_MATRIX_LED_COUNT) { | ||
| 150 | memcpy_P(&led, (&g_snled27351_leds[index]), sizeof(led)); | ||
| 151 | |||
| 152 | if (g_pwm_buffer[led.driver][led.r] == red && g_pwm_buffer[led.driver][led.g] == green && g_pwm_buffer[led.driver][led.b] == blue) { | ||
| 153 | return; | ||
| 154 | } | ||
| 155 | g_pwm_buffer[led.driver][led.r] = red; | ||
| 156 | g_pwm_buffer[led.driver][led.g] = green; | ||
| 157 | g_pwm_buffer[led.driver][led.b] = blue; | ||
| 158 | g_pwm_buffer_update_required[led.driver] = true; | ||
| 159 | } | ||
| 160 | } | ||
| 161 | |||
| 162 | void snled27351_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { | ||
| 163 | for (int i = 0; i < RGB_MATRIX_LED_COUNT; i++) { | ||
| 164 | snled27351_set_color(i, red, green, blue); | ||
| 165 | } | ||
| 166 | } | ||
| 167 | |||
| 168 | void snled27351_set_led_control_register(uint8_t index, bool red, bool green, bool blue) { | ||
| 169 | snled27351_led_t led; | ||
| 170 | memcpy_P(&led, (&g_snled27351_leds[index]), sizeof(led)); | ||
| 171 | |||
| 172 | uint8_t control_register_r = led.r / 8; | ||
| 173 | uint8_t control_register_g = led.g / 8; | ||
| 174 | uint8_t control_register_b = led.b / 8; | ||
| 175 | uint8_t bit_r = led.r % 8; | ||
| 176 | uint8_t bit_g = led.g % 8; | ||
| 177 | uint8_t bit_b = led.b % 8; | ||
| 178 | |||
| 179 | if (red) { | ||
| 180 | g_led_control_registers[led.driver][control_register_r] |= (1 << bit_r); | ||
| 181 | } else { | ||
| 182 | g_led_control_registers[led.driver][control_register_r] &= ~(1 << bit_r); | ||
| 183 | } | ||
| 184 | if (green) { | ||
| 185 | g_led_control_registers[led.driver][control_register_g] |= (1 << bit_g); | ||
| 186 | } else { | ||
| 187 | g_led_control_registers[led.driver][control_register_g] &= ~(1 << bit_g); | ||
| 188 | } | ||
| 189 | if (blue) { | ||
| 190 | g_led_control_registers[led.driver][control_register_b] |= (1 << bit_b); | ||
| 191 | } else { | ||
| 192 | g_led_control_registers[led.driver][control_register_b] &= ~(1 << bit_b); | ||
| 193 | } | ||
| 194 | |||
| 195 | g_led_control_registers_update_required[led.driver] = true; | ||
| 196 | } | ||
| 197 | |||
| 198 | void snled27351_update_pwm_buffers(uint8_t addr, uint8_t index) { | ||
| 199 | if (g_pwm_buffer_update_required[index]) { | ||
| 200 | snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_LED_PWM_PAGE); | ||
| 201 | |||
| 202 | // If any of the transactions fail we risk writing dirty PG0, | ||
| 203 | // refresh page 0 just in case. | ||
| 204 | if (!snled27351_write_pwm_buffer(addr, g_pwm_buffer[index])) { | ||
| 205 | g_led_control_registers_update_required[index] = true; | ||
| 206 | } | ||
| 207 | } | ||
| 208 | g_pwm_buffer_update_required[index] = false; | ||
| 209 | } | ||
| 210 | |||
| 211 | void snled27351_update_led_control_registers(uint8_t addr, uint8_t index) { | ||
| 212 | if (g_led_control_registers_update_required[index]) { | ||
| 213 | snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_LED_CONTROL_PAGE); | ||
| 214 | for (int i = 0; i < 24; i++) { | ||
| 215 | snled27351_write_register(addr, i, g_led_control_registers[index][i]); | ||
| 216 | } | ||
| 217 | } | ||
| 218 | g_led_control_registers_update_required[index] = false; | ||
| 219 | } | ||
| 220 | |||
| 221 | void snled27351_sw_return_normal(uint8_t addr) { | ||
| 222 | // Select to function page | ||
| 223 | snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_FUNCTION_PAGE); | ||
| 224 | // Setting LED driver to normal mode | ||
| 225 | snled27351_write_register(addr, SNLED27351_REG_CONFIGURATION, SNLED27351_MSKSW_NORMAL_MODE); | ||
| 226 | } | ||
| 227 | |||
| 228 | void snled27351_sw_shutdown(uint8_t addr) { | ||
| 229 | // Select to function page | ||
| 230 | snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_FUNCTION_PAGE); | ||
| 231 | // Setting LED driver to shutdown mode | ||
| 232 | snled27351_write_register(addr, SNLED27351_REG_CONFIGURATION, SNLED27351_MSKSW_SHUT_DOWN_MODE); | ||
| 233 | // Write SW Sleep Register | ||
| 234 | snled27351_write_register(addr, SNLED27351_REG_SOFTWARE_SLEEP, SNLED27351_MSKSLEEP_ENABLE); | ||
| 235 | } | ||
diff --git a/drivers/led/snled27351.h b/drivers/led/snled27351.h new file mode 100644 index 0000000000..770becdba1 --- /dev/null +++ b/drivers/led/snled27351.h | |||
| @@ -0,0 +1,378 @@ | |||
| 1 | /* Copyright 2021 @ Keychron (https://www.keychron.com) | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #pragma once | ||
| 18 | |||
| 19 | #include <stdint.h> | ||
| 20 | #include <stdbool.h> | ||
| 21 | #include "progmem.h" | ||
| 22 | |||
| 23 | // ======== DEPRECATED DEFINES - DO NOT USE ======== | ||
| 24 | #ifdef DRIVER_COUNT | ||
| 25 | # define SNLED27351_DRIVER_COUNT DRIVER_COUNT | ||
| 26 | #endif | ||
| 27 | #ifdef CKLED2001_TIMEOUT | ||
| 28 | # define SNLED27351_I2C_TIMEOUT CKLED2001_TIMEOUT | ||
| 29 | #endif | ||
| 30 | #ifdef CKLED2001_PERSISTENCE | ||
| 31 | # define SNLED27351_I2C_PERSISTENCE CKLED2001_PERSISTENCE | ||
| 32 | #endif | ||
| 33 | #ifdef PHASE_CHANNEL | ||
| 34 | # define SNLED27351_PHASE_CHANNEL PHASE_CHANNEL | ||
| 35 | #endif | ||
| 36 | #ifdef CKLED2001_CURRENT_TUNE | ||
| 37 | # define SNLED27351_CURRENT_TUNE CKLED2001_CURRENT_TUNE | ||
| 38 | #endif | ||
| 39 | |||
| 40 | #define MSKPHASE_12CHANNEL SNLED27351_MSKPHASE_12CHANNEL | ||
| 41 | #define MSKPHASE_11CHANNEL SNLED27351_MSKPHASE_11CHANNEL | ||
| 42 | #define MSKPHASE_10CHANNEL SNLED27351_MSKPHASE_10CHANNEL | ||
| 43 | #define MSKPHASE_9CHANNEL SNLED27351_MSKPHASE_9CHANNEL | ||
| 44 | #define MSKPHASE_8CHANNEL SNLED27351_MSKPHASE_8CHANNEL | ||
| 45 | #define MSKPHASE_7CHANNEL SNLED27351_MSKPHASE_7CHANNEL | ||
| 46 | #define MSKPHASE_6CHANNEL SNLED27351_MSKPHASE_6CHANNEL | ||
| 47 | #define MSKPHASE_5CHANNEL SNLED27351_MSKPHASE_5CHANNEL | ||
| 48 | #define MSKPHASE_4CHANNEL SNLED27351_MSKPHASE_4CHANNEL | ||
| 49 | #define MSKPHASE_3CHANNEL SNLED27351_MSKPHASE_3CHANNEL | ||
| 50 | #define MSKPHASE_2CHANNEL SNLED27351_MSKPHASE_2CHANNEL | ||
| 51 | #define MSKPHASE_1CHANNEL SNLED27351_MSKPHASE_1CHANNEL | ||
| 52 | |||
| 53 | #define ckled2001_led snled27351_led_t | ||
| 54 | #define g_ckled2001_leds g_snled27351_leds | ||
| 55 | // ======== | ||
| 56 | |||
| 57 | #define SNLED27351_I2C_ADDRESS_GND 0x74 | ||
| 58 | #define SNLED27351_I2C_ADDRESS_SCL 0x75 | ||
| 59 | #define SNLED27351_I2C_ADDRESS_SDA 0x76 | ||
| 60 | #define SNLED27351_I2C_ADDRESS_VDDIO 0x77 | ||
| 61 | |||
| 62 | typedef struct snled27351_led_t { | ||
| 63 | uint8_t driver : 2; | ||
| 64 | uint8_t r; | ||
| 65 | uint8_t g; | ||
| 66 | uint8_t b; | ||
| 67 | } __attribute__((packed)) snled27351_led_t; | ||
| 68 | |||
| 69 | extern const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT]; | ||
| 70 | |||
| 71 | void snled27351_init(uint8_t addr); | ||
| 72 | bool snled27351_write_register(uint8_t addr, uint8_t reg, uint8_t data); | ||
| 73 | bool snled27351_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer); | ||
| 74 | |||
| 75 | void snled27351_set_color(int index, uint8_t red, uint8_t green, uint8_t blue); | ||
| 76 | void snled27351_set_color_all(uint8_t red, uint8_t green, uint8_t blue); | ||
| 77 | |||
| 78 | void snled27351_set_led_control_register(uint8_t index, bool red, bool green, bool blue); | ||
| 79 | |||
| 80 | // This should not be called from an interrupt | ||
| 81 | // (eg. from a timer interrupt). | ||
| 82 | // Call this while idle (in between matrix scans). | ||
| 83 | // If the buffer is dirty, it will update the driver with the buffer. | ||
| 84 | void snled27351_update_pwm_buffers(uint8_t addr, uint8_t index); | ||
| 85 | void snled27351_update_led_control_registers(uint8_t addr, uint8_t index); | ||
| 86 | |||
| 87 | void snled27351_sw_return_normal(uint8_t addr); | ||
| 88 | void snled27351_sw_shutdown(uint8_t addr); | ||
| 89 | |||
| 90 | // Registers Page Define | ||
| 91 | #define SNLED27351_REG_CONFIGURE_CMD_PAGE 0xFD | ||
| 92 | #define SNLED27351_LED_CONTROL_PAGE 0x00 | ||
| 93 | #define SNLED27351_LED_PWM_PAGE 0x01 | ||
| 94 | #define SNLED27351_FUNCTION_PAGE 0x03 | ||
| 95 | #define SNLED27351_CURRENT_TUNE_PAGE 0x04 | ||
| 96 | |||
| 97 | // Function Register: address 0x00 | ||
| 98 | #define SNLED27351_REG_CONFIGURATION 0x00 | ||
| 99 | #define SNLED27351_MSKSW_SHUT_DOWN_MODE (0x0 << 0) | ||
| 100 | #define SNLED27351_MSKSW_NORMAL_MODE (0x1 << 0) | ||
| 101 | |||
| 102 | #define SNLED27351_REG_DRIVER_ID 0x11 | ||
| 103 | #define SNLED27351_DRIVER_ID 0x8A | ||
| 104 | |||
| 105 | #define SNLED27351_REG_PDU 0x13 | ||
| 106 | #define SNLED27351_MSKSET_CA_CB_CHANNEL 0xAA | ||
| 107 | #define SNLED27351_MSKCLR_CA_CB_CHANNEL 0x00 | ||
| 108 | |||
| 109 | #define SNLED27351_REG_SCAN_PHASE 0x14 | ||
| 110 | #define SNLED27351_MSKPHASE_12CHANNEL 0x00 | ||
| 111 | #define SNLED27351_MSKPHASE_11CHANNEL 0x01 | ||
| 112 | #define SNLED27351_MSKPHASE_10CHANNEL 0x02 | ||
| 113 | #define SNLED27351_MSKPHASE_9CHANNEL 0x03 | ||
| 114 | #define SNLED27351_MSKPHASE_8CHANNEL 0x04 | ||
| 115 | #define SNLED27351_MSKPHASE_7CHANNEL 0x05 | ||
| 116 | #define SNLED27351_MSKPHASE_6CHANNEL 0x06 | ||
| 117 | #define SNLED27351_MSKPHASE_5CHANNEL 0x07 | ||
| 118 | #define SNLED27351_MSKPHASE_4CHANNEL 0x08 | ||
| 119 | #define SNLED27351_MSKPHASE_3CHANNEL 0x09 | ||
| 120 | #define SNLED27351_MSKPHASE_2CHANNEL 0x0A | ||
| 121 | #define SNLED27351_MSKPHASE_1CHANNEL 0x0B | ||
| 122 | |||
| 123 | #define SNLED27351_REG_SLEW_RATE_CONTROL_MODE1 0x15 | ||
| 124 | #define SNLED27351_MSKPWM_DELAY_PHASE_ENABLE 0x04 | ||
| 125 | #define SNLED27351_MSKPWM_DELAY_PHASE_DISABLE 0x00 | ||
| 126 | |||
| 127 | #define SNLED27351_REG_SLEW_RATE_CONTROL_MODE2 0x16 | ||
| 128 | #define SNLED27351_MSKDRIVING_SINKING_CHANNEL_SLEWRATE_ENABLE 0xC0 | ||
| 129 | #define SNLED27351_MSKDRIVING_SINKING_CHANNEL_SLEWRATE_DISABLE 0x00 | ||
| 130 | |||
| 131 | #define SNLED27351_REG_OPEN_SHORT_ENABLE 0x17 | ||
| 132 | #define SNLED27351_MSKOPEN_DETECTION_ENABLE (0x01 << 7) | ||
| 133 | #define SNLED27351_MSKOPEN_DETECTION_DISABLE (0x00) | ||
| 134 | |||
| 135 | #define SNLED27351_MSKSHORT_DETECTION_ENABLE (0x01 << 6) | ||
| 136 | #define SNLED27351_MSKSHORT_DETECTION_DISABLE (0x00) | ||
| 137 | |||
| 138 | #define SNLED27351_REG_OPEN_SHORT_DUTY 0x18 | ||
| 139 | #define SNLED27351_REG_OPEN_SHORT_FLAG 0x19 | ||
| 140 | |||
| 141 | #define SNLED27351_MSKOPEN_DETECTION_INTERRUPT_ENABLE (0x01 << 7) | ||
| 142 | #define SNLED27351_MSKOPEN_DETECTION_INTERRUPT_DISABLE (0x00) | ||
| 143 | |||
| 144 | #define SNLED27351_MSKSHORT_DETECTION_INTERRUPT_ENABLE (0x01 << 6) | ||
| 145 | #define SNLED27351_MSKSHORT_DETECTION_INTERRUPT_DISABLE (0x00) | ||
| 146 | |||
| 147 | #define SNLED27351_REG_SOFTWARE_SLEEP 0x1A | ||
| 148 | #define SNLED27351_MSKSLEEP_ENABLE 0x02 | ||
| 149 | #define SNLED27351_MSKSLEEP_DISABLE 0x00 | ||
| 150 | |||
| 151 | // LED Control Registers | ||
| 152 | #define SNLED27351_LED_CONTROL_ON_OFF_FIRST_ADDR 0x0 | ||
| 153 | #define SNLED27351_LED_CONTROL_ON_OFF_LAST_ADDR 0x17 | ||
| 154 | #define SNLED27351_LED_CONTROL_ON_OFF_LENGTH ((SNLED27351_LED_CONTROL_ON_OFF_LAST_ADDR - SNLED27351_LED_CONTROL_ON_OFF_FIRST_ADDR) + 1) | ||
| 155 | |||
| 156 | #define SNLED27351_LED_CONTROL_OPEN_FIRST_ADDR 0x18 | ||
| 157 | #define SNLED27351_LED_CONTROL_OPEN_LAST_ADDR 0x2F | ||
| 158 | #define SNLED27351_LED_CONTROL_OPEN_LENGTH ((SNLED27351_LED_CONTROL_OPEN_LAST_ADDR - SNLED27351_LED_CONTROL_OPEN_FIRST_ADDR) + 1) | ||
| 159 | |||
| 160 | #define SNLED27351_LED_CONTROL_SHORT_FIRST_ADDR 0x30 | ||
| 161 | #define SNLED27351_LED_CONTROL_SHORT_LAST_ADDR 0x47 | ||
| 162 | #define SNLED27351_LED_CONTROL_SHORT_LENGTH ((SNLED27351_LED_CONTROL_SHORT_LAST_ADDR - SNLED27351_LED_CONTROL_SHORT_FIRST_ADDR) + 1) | ||
| 163 | |||
| 164 | #define SNLED27351_LED_CONTROL_PAGE_LENGTH 0x48 | ||
| 165 | |||
| 166 | // LED Control Registers | ||
| 167 | #define SNLED27351_LED_PWM_FIRST_ADDR 0x00 | ||
| 168 | #define SNLED27351_LED_PWM_LAST_ADDR 0xBF | ||
| 169 | #define SNLED27351_LED_PWM_LENGTH 0xC0 | ||
| 170 | |||
| 171 | // Current Tune Registers | ||
| 172 | #define SNLED27351_LED_CURRENT_TUNE_FIRST_ADDR 0x00 | ||
| 173 | #define SNLED27351_LED_CURRENT_TUNE_LAST_ADDR 0x0B | ||
| 174 | #define SNLED27351_LED_CURRENT_TUNE_LENGTH 0x0C | ||
| 175 | |||
| 176 | #define A_1 0x00 | ||
| 177 | #define A_2 0x01 | ||
| 178 | #define A_3 0x02 | ||
| 179 | #define A_4 0x03 | ||
| 180 | #define A_5 0x04 | ||
| 181 | #define A_6 0x05 | ||
| 182 | #define A_7 0x06 | ||
| 183 | #define A_8 0x07 | ||
| 184 | #define A_9 0x08 | ||
| 185 | #define A_10 0x09 | ||
| 186 | #define A_11 0x0A | ||
| 187 | #define A_12 0x0B | ||
| 188 | #define A_13 0x0C | ||
| 189 | #define A_14 0x0D | ||
| 190 | #define A_15 0x0E | ||
| 191 | #define A_16 0x0F | ||
| 192 | |||
| 193 | #define B_1 0x10 | ||
| 194 | #define B_2 0x11 | ||
| 195 | #define B_3 0x12 | ||
| 196 | #define B_4 0x13 | ||
| 197 | #define B_5 0x14 | ||
| 198 | #define B_6 0x15 | ||
| 199 | #define B_7 0x16 | ||
| 200 | #define B_8 0x17 | ||
| 201 | #define B_9 0x18 | ||
| 202 | #define B_10 0x19 | ||
| 203 | #define B_11 0x1A | ||
| 204 | #define B_12 0x1B | ||
| 205 | #define B_13 0x1C | ||
| 206 | #define B_14 0x1D | ||
| 207 | #define B_15 0x1E | ||
| 208 | #define B_16 0x1F | ||
| 209 | |||
| 210 | #define C_1 0x20 | ||
| 211 | #define C_2 0x21 | ||
| 212 | #define C_3 0x22 | ||
| 213 | #define C_4 0x23 | ||
| 214 | #define C_5 0x24 | ||
| 215 | #define C_6 0x25 | ||
| 216 | #define C_7 0x26 | ||
| 217 | #define C_8 0x27 | ||
| 218 | #define C_9 0x28 | ||
| 219 | #define C_10 0x29 | ||
| 220 | #define C_11 0x2A | ||
| 221 | #define C_12 0x2B | ||
| 222 | #define C_13 0x2C | ||
| 223 | #define C_14 0x2D | ||
| 224 | #define C_15 0x2E | ||
| 225 | #define C_16 0x2F | ||
| 226 | |||
| 227 | #define D_1 0x30 | ||
| 228 | #define D_2 0x31 | ||
| 229 | #define D_3 0x32 | ||
| 230 | #define D_4 0x33 | ||
| 231 | #define D_5 0x34 | ||
| 232 | #define D_6 0x35 | ||
| 233 | #define D_7 0x36 | ||
| 234 | #define D_8 0x37 | ||
| 235 | #define D_9 0x38 | ||
| 236 | #define D_10 0x39 | ||
| 237 | #define D_11 0x3A | ||
| 238 | #define D_12 0x3B | ||
| 239 | #define D_13 0x3C | ||
| 240 | #define D_14 0x3D | ||
| 241 | #define D_15 0x3E | ||
| 242 | #define D_16 0x3F | ||
| 243 | |||
| 244 | #define E_1 0x40 | ||
| 245 | #define E_2 0x41 | ||
| 246 | #define E_3 0x42 | ||
| 247 | #define E_4 0x43 | ||
| 248 | #define E_5 0x44 | ||
| 249 | #define E_6 0x45 | ||
| 250 | #define E_7 0x46 | ||
| 251 | #define E_8 0x47 | ||
| 252 | #define E_9 0x48 | ||
| 253 | #define E_10 0x49 | ||
| 254 | #define E_11 0x4A | ||
| 255 | #define E_12 0x4B | ||
| 256 | #define E_13 0x4C | ||
| 257 | #define E_14 0x4D | ||
| 258 | #define E_15 0x4E | ||
| 259 | #define E_16 0x4F | ||
| 260 | |||
| 261 | #define F_1 0x50 | ||
| 262 | #define F_2 0x51 | ||
| 263 | #define F_3 0x52 | ||
| 264 | #define F_4 0x53 | ||
| 265 | #define F_5 0x54 | ||
| 266 | #define F_6 0x55 | ||
| 267 | #define F_7 0x56 | ||
| 268 | #define F_8 0x57 | ||
| 269 | #define F_9 0x58 | ||
| 270 | #define F_10 0x59 | ||
| 271 | #define F_11 0x5A | ||
| 272 | #define F_12 0x5B | ||
| 273 | #define F_13 0x5C | ||
| 274 | #define F_14 0x5D | ||
| 275 | #define F_15 0x5E | ||
| 276 | #define F_16 0x5F | ||
| 277 | |||
| 278 | #define G_1 0x60 | ||
| 279 | #define G_2 0x61 | ||
| 280 | #define G_3 0x62 | ||
| 281 | #define G_4 0x63 | ||
| 282 | #define G_5 0x64 | ||
| 283 | #define G_6 0x65 | ||
| 284 | #define G_7 0x66 | ||
| 285 | #define G_8 0x67 | ||
| 286 | #define G_9 0x68 | ||
| 287 | #define G_10 0x69 | ||
| 288 | #define G_11 0x6A | ||
| 289 | #define G_12 0x6B | ||
| 290 | #define G_13 0x6C | ||
| 291 | #define G_14 0x6D | ||
| 292 | #define G_15 0x6E | ||
| 293 | #define G_16 0x6F | ||
| 294 | |||
| 295 | #define H_1 0x70 | ||
| 296 | #define H_2 0x71 | ||
| 297 | #define H_3 0x72 | ||
| 298 | #define H_4 0x73 | ||
| 299 | #define H_5 0x74 | ||
| 300 | #define H_6 0x75 | ||
| 301 | #define H_7 0x76 | ||
| 302 | #define H_8 0x77 | ||
| 303 | #define H_9 0x78 | ||
| 304 | #define H_10 0x79 | ||
| 305 | #define H_11 0x7A | ||
| 306 | #define H_12 0x7B | ||
| 307 | #define H_13 0x7C | ||
| 308 | #define H_14 0x7D | ||
| 309 | #define H_15 0x7E | ||
| 310 | #define H_16 0x7F | ||
| 311 | |||
| 312 | #define I_1 0x80 | ||
| 313 | #define I_2 0x81 | ||
| 314 | #define I_3 0x82 | ||
| 315 | #define I_4 0x83 | ||
| 316 | #define I_5 0x84 | ||
| 317 | #define I_6 0x85 | ||
| 318 | #define I_7 0x86 | ||
| 319 | #define I_8 0x87 | ||
| 320 | #define I_9 0x88 | ||
| 321 | #define I_10 0x89 | ||
| 322 | #define I_11 0x8A | ||
| 323 | #define I_12 0x8B | ||
| 324 | #define I_13 0x8C | ||
| 325 | #define I_14 0x8D | ||
| 326 | #define I_15 0x8E | ||
| 327 | #define I_16 0x8F | ||
| 328 | |||
| 329 | #define J_1 0x90 | ||
| 330 | #define J_2 0x91 | ||
| 331 | #define J_3 0x92 | ||
| 332 | #define J_4 0x93 | ||
| 333 | #define J_5 0x94 | ||
| 334 | #define J_6 0x95 | ||
| 335 | #define J_7 0x96 | ||
| 336 | #define J_8 0x97 | ||
| 337 | #define J_9 0x98 | ||
| 338 | #define J_10 0x99 | ||
| 339 | #define J_11 0x9A | ||
| 340 | #define J_12 0x9B | ||
| 341 | #define J_13 0x9C | ||
| 342 | #define J_14 0x9D | ||
| 343 | #define J_15 0x9E | ||
| 344 | #define J_16 0x9F | ||
| 345 | |||
| 346 | #define K_1 0xA0 | ||
| 347 | #define K_2 0xA1 | ||
| 348 | #define K_3 0xA2 | ||
| 349 | #define K_4 0xA3 | ||
| 350 | #define K_5 0xA4 | ||
| 351 | #define K_6 0xA5 | ||
| 352 | #define K_7 0xA6 | ||
| 353 | #define K_8 0xA7 | ||
| 354 | #define K_9 0xA8 | ||
| 355 | #define K_10 0xA9 | ||
| 356 | #define K_11 0xAA | ||
| 357 | #define K_12 0xAB | ||
| 358 | #define K_13 0xAC | ||
| 359 | #define K_14 0xAD | ||
| 360 | #define K_15 0xAE | ||
| 361 | #define K_16 0xAF | ||
| 362 | |||
| 363 | #define L_1 0xB0 | ||
| 364 | #define L_2 0xB1 | ||
| 365 | #define L_3 0xB2 | ||
| 366 | #define L_4 0xB3 | ||
| 367 | #define L_5 0xB4 | ||
| 368 | #define L_6 0xB5 | ||
| 369 | #define L_7 0xB6 | ||
| 370 | #define L_8 0xB7 | ||
| 371 | #define L_9 0xB8 | ||
| 372 | #define L_10 0xB9 | ||
| 373 | #define L_11 0xBA | ||
| 374 | #define L_12 0xBB | ||
| 375 | #define L_13 0xBC | ||
| 376 | #define L_14 0xBD | ||
| 377 | #define L_15 0xBE | ||
| 378 | #define L_16 0xBF | ||
diff --git a/keyboards/akko/5108/5108.c b/keyboards/akko/5108/5108.c index a14f02bc76..91f53e1e55 100644 --- a/keyboards/akko/5108/5108.c +++ b/keyboards/akko/5108/5108.c | |||
| @@ -17,8 +17,8 @@ | |||
| 17 | #include "quantum.h" | 17 | #include "quantum.h" |
| 18 | // clang-format off | 18 | // clang-format off |
| 19 | #ifdef RGB_MATRIX_ENABLE | 19 | #ifdef RGB_MATRIX_ENABLE |
| 20 | const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { | 20 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 21 | /* Refer to IS31 manual for these locations | 21 | /* Refer to SNLED27351 manual for these locations |
| 22 | * driver | 22 | * driver |
| 23 | * | R location | 23 | * | R location |
| 24 | * | | G location | 24 | * | | G location |
diff --git a/keyboards/akko/5108/config.h b/keyboards/akko/5108/config.h index a50041ccc9..73c7c27939 100644 --- a/keyboards/akko/5108/config.h +++ b/keyboards/akko/5108/config.h | |||
| @@ -34,9 +34,9 @@ | |||
| 34 | #define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12 | 34 | #define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12 |
| 35 | 35 | ||
| 36 | /* I2C Config for LED Driver */ | 36 | /* I2C Config for LED Driver */ |
| 37 | #define IS31FL3733_DRIVER_COUNT 2 | 37 | #define SNLED27351_DRIVER_COUNT 2 |
| 38 | #define DRIVER_ADDR_1 0b1110100 | 38 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_GND |
| 39 | #define DRIVER_ADDR_2 0b1110111 | 39 | #define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_VDDIO |
| 40 | #define I2C1_SCL_PAL_MODE 4 | 40 | #define I2C1_SCL_PAL_MODE 4 |
| 41 | #define I2C1_OPMODE OPMODE_I2C | 41 | #define I2C1_OPMODE OPMODE_I2C |
| 42 | #define I2C1_CLOCK_SPEED 400000 /* 400000 */ | 42 | #define I2C1_CLOCK_SPEED 400000 /* 400000 */ |
diff --git a/keyboards/akko/5108/info.json b/keyboards/akko/5108/info.json index 93e73f3cd3..662a949a53 100644 --- a/keyboards/akko/5108/info.json +++ b/keyboards/akko/5108/info.json | |||
| @@ -41,7 +41,7 @@ | |||
| 41 | "caps_lock": "C10" | 41 | "caps_lock": "C10" |
| 42 | }, | 42 | }, |
| 43 | "rgb_matrix": { | 43 | "rgb_matrix": { |
| 44 | "driver": "is31fl3733", | 44 | "driver": "snled27351", |
| 45 | "max_brightness": 180, | 45 | "max_brightness": 180, |
| 46 | "animations": { | 46 | "animations": { |
| 47 | "breathing": true, | 47 | "breathing": true, |
diff --git a/keyboards/akko/acr87/acr87.c b/keyboards/akko/acr87/acr87.c index e175e21368..7ee9ec6470 100644 --- a/keyboards/akko/acr87/acr87.c +++ b/keyboards/akko/acr87/acr87.c | |||
| @@ -17,8 +17,8 @@ | |||
| 17 | #include "quantum.h" | 17 | #include "quantum.h" |
| 18 | // clang-format off | 18 | // clang-format off |
| 19 | #ifdef RGB_MATRIX_ENABLE | 19 | #ifdef RGB_MATRIX_ENABLE |
| 20 | const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { | 20 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 21 | /* Refer to IS31 manual for these locations | 21 | /* Refer to SNLED27351 manual for these locations |
| 22 | * driver | 22 | * driver |
| 23 | * | R location | 23 | * | R location |
| 24 | * | | G location | 24 | * | | G location |
diff --git a/keyboards/akko/acr87/config.h b/keyboards/akko/acr87/config.h index 6afa413552..1ff3380d6a 100644 --- a/keyboards/akko/acr87/config.h +++ b/keyboards/akko/acr87/config.h | |||
| @@ -31,10 +31,10 @@ | |||
| 31 | #define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12 | 31 | #define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12 |
| 32 | 32 | ||
| 33 | /* I2C Config for LED Driver */ | 33 | /* I2C Config for LED Driver */ |
| 34 | #define IS31FL3733_DRIVER_COUNT 3 | 34 | #define SNLED27351_DRIVER_COUNT 3 |
| 35 | #define DRIVER_ADDR_1 0b1110100 | 35 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_GND |
| 36 | #define DRIVER_ADDR_2 0b1110111 | 36 | #define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_VDDIO |
| 37 | #define DRIVER_ADDR_3 0b1110110 | 37 | #define DRIVER_ADDR_3 SNLED27351_I2C_ADDRESS_SDA |
| 38 | 38 | ||
| 39 | #define I2C1_SCL_PAL_MODE 4 | 39 | #define I2C1_SCL_PAL_MODE 4 |
| 40 | #define I2C1_OPMODE OPMODE_I2C | 40 | #define I2C1_OPMODE OPMODE_I2C |
diff --git a/keyboards/akko/acr87/info.json b/keyboards/akko/acr87/info.json index 0533d328a9..5ccb0c3f73 100644 --- a/keyboards/akko/acr87/info.json +++ b/keyboards/akko/acr87/info.json | |||
| @@ -37,7 +37,7 @@ | |||
| 37 | } | 37 | } |
| 38 | }, | 38 | }, |
| 39 | "rgb_matrix": { | 39 | "rgb_matrix": { |
| 40 | "driver": "is31fl3733", | 40 | "driver": "snled27351", |
| 41 | "max_brightness": 180, | 41 | "max_brightness": 180, |
| 42 | "animations": { | 42 | "animations": { |
| 43 | "breathing": true, | 43 | "breathing": true, |
diff --git a/keyboards/akko/top40/config.h b/keyboards/akko/top40/config.h index 09474e1217..fd10534ce7 100644 --- a/keyboards/akko/top40/config.h +++ b/keyboards/akko/top40/config.h | |||
| @@ -31,9 +31,9 @@ | |||
| 31 | #define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12 | 31 | #define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12 |
| 32 | 32 | ||
| 33 | /* I2C Config for LED Driver */ | 33 | /* I2C Config for LED Driver */ |
| 34 | #define IS31FL3733_DRIVER_COUNT 2 | 34 | #define SNLED27351_DRIVER_COUNT 2 |
| 35 | #define DRIVER_ADDR_1 0b1110100 | 35 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_GND |
| 36 | #define DRIVER_ADDR_2 0b1110111 | 36 | #define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_VDDIO |
| 37 | #define I2C1_SCL_PAL_MODE 4 | 37 | #define I2C1_SCL_PAL_MODE 4 |
| 38 | #define I2C1_OPMODE OPMODE_I2C | 38 | #define I2C1_OPMODE OPMODE_I2C |
| 39 | #define I2C1_CLOCK_SPEED 400000 /* 400000 */ | 39 | #define I2C1_CLOCK_SPEED 400000 /* 400000 */ |
diff --git a/keyboards/akko/top40/info.json b/keyboards/akko/top40/info.json index b5ff321740..243952ccc8 100644 --- a/keyboards/akko/top40/info.json +++ b/keyboards/akko/top40/info.json | |||
| @@ -37,7 +37,7 @@ | |||
| 37 | } | 37 | } |
| 38 | }, | 38 | }, |
| 39 | "rgb_matrix": { | 39 | "rgb_matrix": { |
| 40 | "driver": "is31fl3733", | 40 | "driver": "snled27351", |
| 41 | "max_brightness": 180, | 41 | "max_brightness": 180, |
| 42 | "animations": { | 42 | "animations": { |
| 43 | "breathing": true, | 43 | "breathing": true, |
diff --git a/keyboards/akko/top40/top40.c b/keyboards/akko/top40/top40.c index 7fe193447d..028e4bdd05 100644 --- a/keyboards/akko/top40/top40.c +++ b/keyboards/akko/top40/top40.c | |||
| @@ -17,8 +17,8 @@ | |||
| 17 | #include "quantum.h" | 17 | #include "quantum.h" |
| 18 | // clang-format off | 18 | // clang-format off |
| 19 | #ifdef RGB_MATRIX_ENABLE | 19 | #ifdef RGB_MATRIX_ENABLE |
| 20 | const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { | 20 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 21 | /* Refer to IS31 manual for these locations | 21 | /* Refer to SNLED27351 manual for these locations |
| 22 | * driver | 22 | * driver |
| 23 | * | R location | 23 | * | R location |
| 24 | * | | G location | 24 | * | | G location |
diff --git a/keyboards/chosfox/cf81/cf81.c b/keyboards/chosfox/cf81/cf81.c index ab8afd0c63..ad7ec9bc55 100644 --- a/keyboards/chosfox/cf81/cf81.c +++ b/keyboards/chosfox/cf81/cf81.c | |||
| @@ -18,8 +18,8 @@ | |||
| 18 | 18 | ||
| 19 | // clang-format off | 19 | // clang-format off |
| 20 | #ifdef RGB_MATRIX_ENABLE | 20 | #ifdef RGB_MATRIX_ENABLE |
| 21 | const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { | 21 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 22 | /* Refer to IS31 manual for these locations | 22 | /* Refer to SNLED27351 manual for these locations |
| 23 | * driver | 23 | * driver |
| 24 | * | R location | 24 | * | R location |
| 25 | * | | G location | 25 | * | | G location |
diff --git a/keyboards/chosfox/cf81/config.h b/keyboards/chosfox/cf81/config.h index 2c85f5dd04..5895d60903 100644 --- a/keyboards/chosfox/cf81/config.h +++ b/keyboards/chosfox/cf81/config.h | |||
| @@ -31,9 +31,9 @@ | |||
| 31 | #define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12 | 31 | #define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12 |
| 32 | 32 | ||
| 33 | /* I2C Config for LED Driver */ | 33 | /* I2C Config for LED Driver */ |
| 34 | #define IS31FL3733_DRIVER_COUNT 2 | 34 | #define SNLED27351_DRIVER_COUNT 2 |
| 35 | #define DRIVER_ADDR_1 0b1110100 | 35 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_GND |
| 36 | #define DRIVER_ADDR_2 0b1110111 | 36 | #define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_VDDIO |
| 37 | #define I2C1_OPMODE OPMODE_I2C | 37 | #define I2C1_OPMODE OPMODE_I2C |
| 38 | #define I2C1_CLOCK_SPEED 400000 /* 400000 */ | 38 | #define I2C1_CLOCK_SPEED 400000 /* 400000 */ |
| 39 | 39 | ||
diff --git a/keyboards/chosfox/cf81/info.json b/keyboards/chosfox/cf81/info.json index bbfc2deb31..5dff610071 100644 --- a/keyboards/chosfox/cf81/info.json +++ b/keyboards/chosfox/cf81/info.json | |||
| @@ -39,7 +39,7 @@ | |||
| 39 | ] | 39 | ] |
| 40 | }, | 40 | }, |
| 41 | "rgb_matrix": { | 41 | "rgb_matrix": { |
| 42 | "driver": "is31fl3733", | 42 | "driver": "snled27351", |
| 43 | "animations": { | 43 | "animations": { |
| 44 | "breathing": true, | 44 | "breathing": true, |
| 45 | "cycle_all": true, | 45 | "cycle_all": true, |
diff --git a/keyboards/inland/kb83/config.h b/keyboards/inland/kb83/config.h index ed1f3cf160..efa076c915 100644 --- a/keyboards/inland/kb83/config.h +++ b/keyboards/inland/kb83/config.h | |||
| @@ -38,9 +38,9 @@ | |||
| 38 | #define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12 | 38 | #define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12 |
| 39 | 39 | ||
| 40 | /* I2C Config for LED Driver */ | 40 | /* I2C Config for LED Driver */ |
| 41 | #define IS31FL3733_DRIVER_COUNT 2 | 41 | #define SNLED27351_DRIVER_COUNT 2 |
| 42 | #define DRIVER_ADDR_1 0b1110100 | 42 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_GND |
| 43 | #define DRIVER_ADDR_2 0b1110111 | 43 | #define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_VDDIO |
| 44 | #define I2C1_SDA_PIN B7 | 44 | #define I2C1_SDA_PIN B7 |
| 45 | #define I2C1_SCL_PIN B6 | 45 | #define I2C1_SCL_PIN B6 |
| 46 | #define I2C1_SCL_PAL_MODE 4 | 46 | #define I2C1_SCL_PAL_MODE 4 |
diff --git a/keyboards/inland/kb83/info.json b/keyboards/inland/kb83/info.json index cd538ef4ee..f0da3f50b6 100644 --- a/keyboards/inland/kb83/info.json +++ b/keyboards/inland/kb83/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "force_nkro": true | 9 | "force_nkro": true |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "is31fl3733" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "processor": "WB32FQ95", | 14 | "processor": "WB32FQ95", |
| 15 | "bootloader": "wb32-dfu", | 15 | "bootloader": "wb32-dfu", |
diff --git a/keyboards/inland/kb83/kb83.c b/keyboards/inland/kb83/kb83.c index 86b52cfe92..49604b93be 100644 --- a/keyboards/inland/kb83/kb83.c +++ b/keyboards/inland/kb83/kb83.c | |||
| @@ -18,8 +18,8 @@ | |||
| 18 | 18 | ||
| 19 | // clang-format off | 19 | // clang-format off |
| 20 | #ifdef RGB_MATRIX_ENABLE | 20 | #ifdef RGB_MATRIX_ENABLE |
| 21 | const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { | 21 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 22 | /* Refer to IS31 manual for these locations | 22 | /* Refer to SNLED27351 manual for these locations |
| 23 | * driver | 23 | * driver |
| 24 | * | R location | 24 | * | R location |
| 25 | * | | G location | 25 | * | | G location |
diff --git a/keyboards/inland/mk47/config.h b/keyboards/inland/mk47/config.h index db9aea328f..7e0115f7f0 100644 --- a/keyboards/inland/mk47/config.h +++ b/keyboards/inland/mk47/config.h | |||
| @@ -25,8 +25,9 @@ | |||
| 25 | #define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12 | 25 | #define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12 |
| 26 | 26 | ||
| 27 | /* I2C Config for LED Driver */ | 27 | /* I2C Config for LED Driver */ |
| 28 | #define IS31FL3733_DRIVER_COUNT 1 | 28 | #define SNLED27351_DRIVER_COUNT 1 |
| 29 | #define DRIVER_ADDR_1 0b1110100 | 29 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_GND |
| 30 | |||
| 30 | /* WB32 MCU has no default definition */ | 31 | /* WB32 MCU has no default definition */ |
| 31 | #define I2C1_OPMODE OPMODE_I2C | 32 | #define I2C1_OPMODE OPMODE_I2C |
| 32 | #define I2C1_CLOCK_SPEED 400000 | 33 | #define I2C1_CLOCK_SPEED 400000 |
diff --git a/keyboards/inland/mk47/info.json b/keyboards/inland/mk47/info.json index 7d94365724..e647723ed8 100644 --- a/keyboards/inland/mk47/info.json +++ b/keyboards/inland/mk47/info.json | |||
| @@ -34,7 +34,7 @@ | |||
| 34 | } | 34 | } |
| 35 | }, | 35 | }, |
| 36 | "rgb_matrix": { | 36 | "rgb_matrix": { |
| 37 | "driver": "is31fl3733", | 37 | "driver": "snled27351", |
| 38 | "max_brightness": 200, | 38 | "max_brightness": 200, |
| 39 | "animations": { | 39 | "animations": { |
| 40 | "breathing": true, | 40 | "breathing": true, |
diff --git a/keyboards/inland/mk47/mk47.c b/keyboards/inland/mk47/mk47.c index f247855944..5a34527c6c 100644 --- a/keyboards/inland/mk47/mk47.c +++ b/keyboards/inland/mk47/mk47.c | |||
| @@ -16,8 +16,8 @@ | |||
| 16 | 16 | ||
| 17 | #include "quantum.h" | 17 | #include "quantum.h" |
| 18 | #ifdef RGB_MATRIX_ENABLE | 18 | #ifdef RGB_MATRIX_ENABLE |
| 19 | const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { | 19 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 20 | /* Refer to IS31 manual for these locations | 20 | /* Refer to SNLED27351 manual for these locations |
| 21 | * driver | 21 | * driver |
| 22 | * | R location | 22 | * | R location |
| 23 | * | | G location | 23 | * | | G location |
diff --git a/keyboards/keychron/c1_pro/ansi/rgb/config.h b/keyboards/keychron/c1_pro/ansi/rgb/config.h index c6b63b4d7c..f2779f2bb9 100644 --- a/keyboards/keychron/c1_pro/ansi/rgb/config.h +++ b/keyboards/keychron/c1_pro/ansi/rgb/config.h | |||
| @@ -20,18 +20,18 @@ | |||
| 20 | // #define MATRIX_UNSELECT_DRIVE_HIGH | 20 | // #define MATRIX_UNSELECT_DRIVE_HIGH |
| 21 | 21 | ||
| 22 | /* RGB Matrix Driver Configuration */ | 22 | /* RGB Matrix Driver Configuration */ |
| 23 | #define CKLED2001_DRIVER_COUNT 2 | 23 | #define SNLED27351_DRIVER_COUNT 2 |
| 24 | #define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO | 24 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO |
| 25 | #define DRIVER_ADDR_2 CKLED2001_I2C_ADDRESS_GND | 25 | #define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_GND |
| 26 | 26 | ||
| 27 | /* RGB Matrix Configuration */ | 27 | /* RGB Matrix Configuration */ |
| 28 | #define DRIVER_1_LED_TOTAL 49 | 28 | #define DRIVER_1_LED_TOTAL 49 |
| 29 | #define DRIVER_2_LED_TOTAL 39 | 29 | #define DRIVER_2_LED_TOTAL 39 |
| 30 | #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) | 30 | #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) |
| 31 | 31 | ||
| 32 | #define CKLED2001_PHASE_CHANNEL CKLED2001_MSKPHASE_9CHANNEL | 32 | #define SNLED27351_PHASE_CHANNEL SNLED27351_MSKPHASE_9CHANNEL |
| 33 | /* Set led driver current */ | 33 | /* Set led driver current */ |
| 34 | #define CKLED2001_CURRENT_TUNE \ | 34 | #define SNLED27351_CURRENT_TUNE \ |
| 35 | { 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44 } | 35 | { 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44 } |
| 36 | 36 | ||
| 37 | /* turn off effects when suspended */ | 37 | /* turn off effects when suspended */ |
diff --git a/keyboards/keychron/c1_pro/ansi/rgb/info.json b/keyboards/keychron/c1_pro/ansi/rgb/info.json index c6011a2837..fcd805706b 100644 --- a/keyboards/keychron/c1_pro/ansi/rgb/info.json +++ b/keyboards/keychron/c1_pro/ansi/rgb/info.json | |||
| @@ -105,7 +105,7 @@ | |||
| 105 | } | 105 | } |
| 106 | }, | 106 | }, |
| 107 | "rgb_matrix": { | 107 | "rgb_matrix": { |
| 108 | "driver": "ckled2001", | 108 | "driver": "snled27351", |
| 109 | "animations": { | 109 | "animations": { |
| 110 | "breathing": true, | 110 | "breathing": true, |
| 111 | "band_spiral_val": true, | 111 | "band_spiral_val": true, |
diff --git a/keyboards/keychron/c1_pro/ansi/rgb/rgb.c b/keyboards/keychron/c1_pro/ansi/rgb/rgb.c index 04565f3b01..c04e82a44e 100644 --- a/keyboards/keychron/c1_pro/ansi/rgb/rgb.c +++ b/keyboards/keychron/c1_pro/ansi/rgb/rgb.c | |||
| @@ -18,8 +18,8 @@ | |||
| 18 | 18 | ||
| 19 | // clang-format off | 19 | // clang-format off |
| 20 | #ifdef RGB_MATRIX_ENABLE | 20 | #ifdef RGB_MATRIX_ENABLE |
| 21 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 21 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 22 | /* Refer to CKLED2001 manual for these locations | 22 | /* Refer to SNLED27351 manual for these locations |
| 23 | * driver | 23 | * driver |
| 24 | * | R location | 24 | * | R location |
| 25 | * | | G location | 25 | * | | G location |
diff --git a/keyboards/keychron/c1_pro/ansi/white/config.h b/keyboards/keychron/c1_pro/ansi/white/config.h index 5492eca28f..430cb68a8e 100644 --- a/keyboards/keychron/c1_pro/ansi/white/config.h +++ b/keyboards/keychron/c1_pro/ansi/white/config.h | |||
| @@ -20,15 +20,15 @@ | |||
| 20 | // #define MATRIX_UNSELECT_DRIVE_HIGH | 20 | // #define MATRIX_UNSELECT_DRIVE_HIGH |
| 21 | 21 | ||
| 22 | /* LED Matrix Driver Configuration */ | 22 | /* LED Matrix Driver Configuration */ |
| 23 | #define CKLED2001_DRIVER_COUNT 1 | 23 | #define SNLED27351_DRIVER_COUNT 1 |
| 24 | #define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_GND | 24 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_GND |
| 25 | 25 | ||
| 26 | /* LED Matrix Configuration */ | 26 | /* LED Matrix Configuration */ |
| 27 | #define LED_MATRIX_LED_COUNT 90 | 27 | #define LED_MATRIX_LED_COUNT 90 |
| 28 | 28 | ||
| 29 | #define CKLED2001_PHASE_CHANNEL CKLED2001_MSKPHASE_9CHANNEL | 29 | #define SNLED27351_PHASE_CHANNEL SNLED27351_MSKPHASE_9CHANNEL |
| 30 | /* Set led driver current */ | 30 | /* Set led driver current */ |
| 31 | #define CKLED2001_CURRENT_TUNE \ | 31 | #define SNLED27351_CURRENT_TUNE \ |
| 32 | { 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44 } | 32 | { 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44 } |
| 33 | 33 | ||
| 34 | /* turn off effects when suspended */ | 34 | /* turn off effects when suspended */ |
diff --git a/keyboards/keychron/c1_pro/ansi/white/info.json b/keyboards/keychron/c1_pro/ansi/white/info.json index 070ed6c427..4a6c6e2b8d 100644 --- a/keyboards/keychron/c1_pro/ansi/white/info.json +++ b/keyboards/keychron/c1_pro/ansi/white/info.json | |||
| @@ -105,7 +105,7 @@ | |||
| 105 | } | 105 | } |
| 106 | }, | 106 | }, |
| 107 | "led_matrix": { | 107 | "led_matrix": { |
| 108 | "driver": "ckled2001", | 108 | "driver": "snled27351", |
| 109 | "animations": { | 109 | "animations": { |
| 110 | "none": true, | 110 | "none": true, |
| 111 | "solid": true, | 111 | "solid": true, |
diff --git a/keyboards/keychron/c1_pro/ansi/white/white.c b/keyboards/keychron/c1_pro/ansi/white/white.c index 72e9ad4db1..15f291e80c 100644 --- a/keyboards/keychron/c1_pro/ansi/white/white.c +++ b/keyboards/keychron/c1_pro/ansi/white/white.c | |||
| @@ -18,8 +18,8 @@ | |||
| 18 | 18 | ||
| 19 | // clang-format off | 19 | // clang-format off |
| 20 | #ifdef LED_MATRIX_ENABLE | 20 | #ifdef LED_MATRIX_ENABLE |
| 21 | const ckled2001_led PROGMEM g_ckled2001_leds[LED_MATRIX_LED_COUNT] = { | 21 | const snled27351_led_t PROGMEM g_snled27351_leds[LED_MATRIX_LED_COUNT] = { |
| 22 | /* Refer to CKLED2001 manual for these locations | 22 | /* Refer to SNLED27351 manual for these locations |
| 23 | * driver | 23 | * driver |
| 24 | * | LED address | 24 | * | LED address |
| 25 | * | | */ | 25 | * | | */ |
diff --git a/keyboards/keychron/c2_pro/ansi/rgb/config.h b/keyboards/keychron/c2_pro/ansi/rgb/config.h index d2d3d61f29..673e8e438e 100644 --- a/keyboards/keychron/c2_pro/ansi/rgb/config.h +++ b/keyboards/keychron/c2_pro/ansi/rgb/config.h | |||
| @@ -17,12 +17,12 @@ | |||
| 17 | #pragma once | 17 | #pragma once |
| 18 | 18 | ||
| 19 | /* RGB Matrix Driver Configuration */ | 19 | /* RGB Matrix Driver Configuration */ |
| 20 | #define CKLED2001_DRIVER_COUNT 2 | 20 | #define SNLED27351_DRIVER_COUNT 2 |
| 21 | #define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO | 21 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO |
| 22 | #define DRIVER_ADDR_2 CKLED2001_I2C_ADDRESS_GND | 22 | #define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_GND |
| 23 | 23 | ||
| 24 | /* Set LED driver current */ | 24 | /* Set LED driver current */ |
| 25 | #define CKLED2001_CURRENT_TUNE \ | 25 | #define SNLED27351_CURRENT_TUNE \ |
| 26 | { 0xAA, 0xAA, 0x56, 0xAA, 0xAA, 0x56, 0xAA, 0xAA, 0x56, 0xAA, 0xAA, 0x56 } | 26 | { 0xAA, 0xAA, 0x56, 0xAA, 0xAA, 0x56, 0xAA, 0xAA, 0x56, 0xAA, 0xAA, 0x56 } |
| 27 | 27 | ||
| 28 | /* RGB Matrix Configuration */ | 28 | /* RGB Matrix Configuration */ |
diff --git a/keyboards/keychron/c2_pro/ansi/rgb/info.json b/keyboards/keychron/c2_pro/ansi/rgb/info.json index e527af3371..1eee0ee1cd 100644 --- a/keyboards/keychron/c2_pro/ansi/rgb/info.json +++ b/keyboards/keychron/c2_pro/ansi/rgb/info.json | |||
| @@ -122,7 +122,7 @@ | |||
| 122 | } | 122 | } |
| 123 | }, | 123 | }, |
| 124 | "rgb_matrix": { | 124 | "rgb_matrix": { |
| 125 | "driver": "ckled2001", | 125 | "driver": "snled27351", |
| 126 | "animations": { | 126 | "animations": { |
| 127 | "breathing": true, | 127 | "breathing": true, |
| 128 | "band_spiral_val": true, | 128 | "band_spiral_val": true, |
diff --git a/keyboards/keychron/c2_pro/ansi/rgb/rgb.c b/keyboards/keychron/c2_pro/ansi/rgb/rgb.c index 998933081f..d42c2de39e 100644 --- a/keyboards/keychron/c2_pro/ansi/rgb/rgb.c +++ b/keyboards/keychron/c2_pro/ansi/rgb/rgb.c | |||
| @@ -17,8 +17,8 @@ | |||
| 17 | #include "quantum.h" | 17 | #include "quantum.h" |
| 18 | 18 | ||
| 19 | #ifdef RGB_MATRIX_ENABLE | 19 | #ifdef RGB_MATRIX_ENABLE |
| 20 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 20 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 21 | /* Refer to CKLED2001 manual for these locations | 21 | /* Refer to SNLED27351 manual for these locations |
| 22 | * driver | 22 | * driver |
| 23 | * | R location | 23 | * | R location |
| 24 | * | | G location | 24 | * | | G location |
diff --git a/keyboards/keychron/c2_pro/ansi/white/config.h b/keyboards/keychron/c2_pro/ansi/white/config.h index fb2ca3aa41..9945901527 100644 --- a/keyboards/keychron/c2_pro/ansi/white/config.h +++ b/keyboards/keychron/c2_pro/ansi/white/config.h | |||
| @@ -17,11 +17,11 @@ | |||
| 17 | #pragma once | 17 | #pragma once |
| 18 | 18 | ||
| 19 | /* LED Matrix Driver Configuration */ | 19 | /* LED Matrix Driver Configuration */ |
| 20 | #define CKLED2001_DRIVER_COUNT 1 | 20 | #define SNLED27351_DRIVER_COUNT 1 |
| 21 | #define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_GND | 21 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_GND |
| 22 | 22 | ||
| 23 | /* Set LED driver current */ | 23 | /* Set LED driver current */ |
| 24 | #define CKLED2001_CURRENT_TUNE \ | 24 | #define SNLED27351_CURRENT_TUNE \ |
| 25 | { 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0 } | 25 | { 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0 } |
| 26 | 26 | ||
| 27 | /* LED Matrix Configuration */ | 27 | /* LED Matrix Configuration */ |
diff --git a/keyboards/keychron/c2_pro/ansi/white/info.json b/keyboards/keychron/c2_pro/ansi/white/info.json index dc58d1943b..4d9b1e12b8 100644 --- a/keyboards/keychron/c2_pro/ansi/white/info.json +++ b/keyboards/keychron/c2_pro/ansi/white/info.json | |||
| @@ -122,7 +122,7 @@ | |||
| 122 | } | 122 | } |
| 123 | }, | 123 | }, |
| 124 | "led_matrix": { | 124 | "led_matrix": { |
| 125 | "driver": "ckled2001", | 125 | "driver": "snled27351", |
| 126 | "animations": { | 126 | "animations": { |
| 127 | "none": true, | 127 | "none": true, |
| 128 | "solid": true, | 128 | "solid": true, |
diff --git a/keyboards/keychron/c2_pro/ansi/white/white.c b/keyboards/keychron/c2_pro/ansi/white/white.c index 963ac8755f..9c75e73c6d 100644 --- a/keyboards/keychron/c2_pro/ansi/white/white.c +++ b/keyboards/keychron/c2_pro/ansi/white/white.c | |||
| @@ -18,8 +18,8 @@ | |||
| 18 | 18 | ||
| 19 | // clang-format off | 19 | // clang-format off |
| 20 | #ifdef LED_MATRIX_ENABLE | 20 | #ifdef LED_MATRIX_ENABLE |
| 21 | const ckled2001_led PROGMEM g_ckled2001_leds[LED_MATRIX_LED_COUNT] = { | 21 | const snled27351_led_t PROGMEM g_snled27351_leds[LED_MATRIX_LED_COUNT] = { |
| 22 | /* Refer to CKLED2001 manual for these locations | 22 | /* Refer to SNLED27351 manual for these locations |
| 23 | * driver | 23 | * driver |
| 24 | * | LED address | 24 | * | LED address |
| 25 | * | | */ | 25 | * | | */ |
diff --git a/keyboards/keychron/q0/config.h b/keyboards/keychron/q0/config.h index c0366b1ed8..f4ec417043 100644 --- a/keyboards/keychron/q0/config.h +++ b/keyboards/keychron/q0/config.h | |||
| @@ -16,7 +16,7 @@ | |||
| 16 | 16 | ||
| 17 | #pragma once | 17 | #pragma once |
| 18 | 18 | ||
| 19 | #define CKLED2001_CURRENT_TUNE { 0xFF, 0xFF, 0x70, 0xFF, 0xFF, 0x70, 0xFF, 0xFF, 0x70, 0xFF, 0xFF, 0x70 } | 19 | #define SNLED27351_CURRENT_TUNE { 0xFF, 0xFF, 0x70, 0xFF, 0xFF, 0x70, 0xFF, 0xFF, 0x70, 0xFF, 0xFF, 0x70 } |
| 20 | 20 | ||
| 21 | /* turn off effects when suspended */ | 21 | /* turn off effects when suspended */ |
| 22 | #define RGB_DISABLE_WHEN_USB_SUSPENDED | 22 | #define RGB_DISABLE_WHEN_USB_SUSPENDED |
diff --git a/keyboards/keychron/q0/rev_0130/config.h b/keyboards/keychron/q0/rev_0130/config.h index c6a241a1ce..8b14e05a29 100644 --- a/keyboards/keychron/q0/rev_0130/config.h +++ b/keyboards/keychron/q0/rev_0130/config.h | |||
| @@ -17,8 +17,8 @@ | |||
| 17 | #pragma once | 17 | #pragma once |
| 18 | 18 | ||
| 19 | /* RGB Matrix Driver Configuration */ | 19 | /* RGB Matrix Driver Configuration */ |
| 20 | #define CKLED2001_DRIVER_COUNT 1 | 20 | #define SNLED27351_DRIVER_COUNT 1 |
| 21 | #define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_GND | 21 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_GND |
| 22 | 22 | ||
| 23 | /* RGB Matrix Configuration */ | 23 | /* RGB Matrix Configuration */ |
| 24 | #define DRIVER_1_LED_TOTAL 21 | 24 | #define DRIVER_1_LED_TOTAL 21 |
diff --git a/keyboards/keychron/q0/rev_0130/info.json b/keyboards/keychron/q0/rev_0130/info.json index f6225c884a..6b5a29d7ea 100644 --- a/keyboards/keychron/q0/rev_0130/info.json +++ b/keyboards/keychron/q0/rev_0130/info.json | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | "processor": "STM32L432", | 29 | "processor": "STM32L432", |
| 30 | "bootloader": "stm32-dfu", | 30 | "bootloader": "stm32-dfu", |
| 31 | "rgb_matrix": { | 31 | "rgb_matrix": { |
| 32 | "driver": "ckled2001", | 32 | "driver": "snled27351", |
| 33 | "animations": { | 33 | "animations": { |
| 34 | "band_spiral_val": true, | 34 | "band_spiral_val": true, |
| 35 | "breathing": true, | 35 | "breathing": true, |
diff --git a/keyboards/keychron/q0/rev_0130/rev_0130.c b/keyboards/keychron/q0/rev_0130/rev_0130.c index ffe82a6d8c..05803234c0 100644 --- a/keyboards/keychron/q0/rev_0130/rev_0130.c +++ b/keyboards/keychron/q0/rev_0130/rev_0130.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to CKLED manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/q0/rev_0131/config.h b/keyboards/keychron/q0/rev_0131/config.h index f1d06a2842..f3187704a7 100644 --- a/keyboards/keychron/q0/rev_0131/config.h +++ b/keyboards/keychron/q0/rev_0131/config.h | |||
| @@ -17,14 +17,14 @@ | |||
| 17 | #pragma once | 17 | #pragma once |
| 18 | 18 | ||
| 19 | /* RGB Matrix Driver Configuration */ | 19 | /* RGB Matrix Driver Configuration */ |
| 20 | #define CKLED2001_DRIVER_COUNT 1 | 20 | #define SNLED27351_DRIVER_COUNT 1 |
| 21 | #define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO | 21 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO |
| 22 | 22 | ||
| 23 | /* RGB Matrix Configuration */ | 23 | /* RGB Matrix Configuration */ |
| 24 | #define DRIVER_1_LED_TOTAL 26 | 24 | #define DRIVER_1_LED_TOTAL 26 |
| 25 | #define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL | 25 | #define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL |
| 26 | 26 | ||
| 27 | #define CKLED2001_PHASE_CHANNEL CKLED2001_MSKPHASE_9CHANNEL | 27 | #define SNLED27351_PHASE_CHANNEL SNLED27351_MSKPHASE_9CHANNEL |
| 28 | 28 | ||
| 29 | /* Enable num-lock LED */ | 29 | /* Enable num-lock LED */ |
| 30 | #define NUM_LOCK_LED_INDEX 5 | 30 | #define NUM_LOCK_LED_INDEX 5 |
diff --git a/keyboards/keychron/q0/rev_0131/info.json b/keyboards/keychron/q0/rev_0131/info.json index c569e498f4..24d2a0488a 100644 --- a/keyboards/keychron/q0/rev_0131/info.json +++ b/keyboards/keychron/q0/rev_0131/info.json | |||
| @@ -38,7 +38,7 @@ | |||
| 38 | "processor": "STM32L432", | 38 | "processor": "STM32L432", |
| 39 | "bootloader": "stm32-dfu", | 39 | "bootloader": "stm32-dfu", |
| 40 | "rgb_matrix": { | 40 | "rgb_matrix": { |
| 41 | "driver": "ckled2001", | 41 | "driver": "snled27351", |
| 42 | "animations": { | 42 | "animations": { |
| 43 | "band_spiral_val": true, | 43 | "band_spiral_val": true, |
| 44 | "breathing": true, | 44 | "breathing": true, |
diff --git a/keyboards/keychron/q0/rev_0131/rev_0131.c b/keyboards/keychron/q0/rev_0131/rev_0131.c index 282c511ce2..0466e1a584 100644 --- a/keyboards/keychron/q0/rev_0131/rev_0131.c +++ b/keyboards/keychron/q0/rev_0131/rev_0131.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to CKLED manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/q10/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q10/ansi_encoder/ansi_encoder.c index c5abcb4f6e..a9df1609e0 100644 --- a/keyboards/keychron/q10/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/q10/ansi_encoder/ansi_encoder.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to IS31 manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/q10/ansi_encoder/info.json b/keyboards/keychron/q10/ansi_encoder/info.json index 8a8a624154..da2cb106e3 100644 --- a/keyboards/keychron/q10/ansi_encoder/info.json +++ b/keyboards/keychron/q10/ansi_encoder/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "encoder": { | 14 | "encoder": { |
| 15 | "rotary": [ | 15 | "rotary": [ |
diff --git a/keyboards/keychron/q10/config.h b/keyboards/keychron/q10/config.h index 3a0d613510..b31322464e 100644 --- a/keyboards/keychron/q10/config.h +++ b/keyboards/keychron/q10/config.h | |||
| @@ -30,9 +30,9 @@ | |||
| 30 | #define DIODE_DIRECTION ROW2COL | 30 | #define DIODE_DIRECTION ROW2COL |
| 31 | 31 | ||
| 32 | /* RGB Matrix Driver Configuration */ | 32 | /* RGB Matrix Driver Configuration */ |
| 33 | #define CKLED2001_DRIVER_COUNT 2 | 33 | #define SNLED27351_DRIVER_COUNT 2 |
| 34 | #define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO | 34 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO |
| 35 | #define DRIVER_ADDR_2 CKLED2001_I2C_ADDRESS_GND | 35 | #define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_GND |
| 36 | 36 | ||
| 37 | /* Increase I2C speed to 1000 KHz */ | 37 | /* Increase I2C speed to 1000 KHz */ |
| 38 | #define I2C1_TIMINGR_PRESC 0U | 38 | #define I2C1_TIMINGR_PRESC 0U |
| @@ -41,8 +41,8 @@ | |||
| 41 | #define I2C1_TIMINGR_SCLH 15U | 41 | #define I2C1_TIMINGR_SCLH 15U |
| 42 | #define I2C1_TIMINGR_SCLL 51U | 42 | #define I2C1_TIMINGR_SCLL 51U |
| 43 | 43 | ||
| 44 | #define CKLED2001_PHASE_CHANNEL CKLED2001_MSKPHASE_9CHANNEL | 44 | #define SNLED27351_PHASE_CHANNEL SNLED27351_MSKPHASE_9CHANNEL |
| 45 | #define CKLED2001_CURRENT_TUNE \ | 45 | #define SNLED27351_CURRENT_TUNE \ |
| 46 | { 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A } | 46 | { 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A } |
| 47 | 47 | ||
| 48 | /* DIP switch */ | 48 | /* DIP switch */ |
diff --git a/keyboards/keychron/q10/iso_encoder/info.json b/keyboards/keychron/q10/iso_encoder/info.json index d7e1bf2885..08e6b2deae 100644 --- a/keyboards/keychron/q10/iso_encoder/info.json +++ b/keyboards/keychron/q10/iso_encoder/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "encoder": { | 14 | "encoder": { |
| 15 | "rotary": [ | 15 | "rotary": [ |
diff --git a/keyboards/keychron/q10/iso_encoder/iso_encoder.c b/keyboards/keychron/q10/iso_encoder/iso_encoder.c index 1e8f80ddd8..fbe4bca637 100644 --- a/keyboards/keychron/q10/iso_encoder/iso_encoder.c +++ b/keyboards/keychron/q10/iso_encoder/iso_encoder.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to IS31 manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/q11/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q11/ansi_encoder/ansi_encoder.c index 0585ae9c96..f7acae7add 100755 --- a/keyboards/keychron/q11/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/q11/ansi_encoder/ansi_encoder.c | |||
| @@ -17,8 +17,8 @@ | |||
| 17 | #include "quantum.h" | 17 | #include "quantum.h" |
| 18 | 18 | ||
| 19 | #ifdef RGB_MATRIX_ENABLE | 19 | #ifdef RGB_MATRIX_ENABLE |
| 20 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 20 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 21 | /* Refer to IS31 manual for these locations | 21 | /* Refer to SNLED27351 manual for these locations |
| 22 | * driver | 22 | * driver |
| 23 | * | R location | 23 | * | R location |
| 24 | * | | G location | 24 | * | | G location |
diff --git a/keyboards/keychron/q11/config.h b/keyboards/keychron/q11/config.h index 90bd7e0a56..6880ee7c2d 100755 --- a/keyboards/keychron/q11/config.h +++ b/keyboards/keychron/q11/config.h | |||
| @@ -27,8 +27,8 @@ | |||
| 27 | #define MATRIX_MASKED // actual mask is defined by `matrix_mask` in `q11.c` | 27 | #define MATRIX_MASKED // actual mask is defined by `matrix_mask` in `q11.c` |
| 28 | 28 | ||
| 29 | /* RGB Matrix Driver Configuration */ | 29 | /* RGB Matrix Driver Configuration */ |
| 30 | #define CKLED2001_DRIVER_COUNT 1 | 30 | #define SNLED27351_DRIVER_COUNT 1 |
| 31 | #define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_GND | 31 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_GND |
| 32 | 32 | ||
| 33 | /* Increase I2C speed to 1000 KHz */ | 33 | /* Increase I2C speed to 1000 KHz */ |
| 34 | #define I2C1_TIMINGR_PRESC 0U | 34 | #define I2C1_TIMINGR_PRESC 0U |
| @@ -37,7 +37,7 @@ | |||
| 37 | #define I2C1_TIMINGR_SCLH 15U | 37 | #define I2C1_TIMINGR_SCLH 15U |
| 38 | #define I2C1_TIMINGR_SCLL 51U | 38 | #define I2C1_TIMINGR_SCLL 51U |
| 39 | 39 | ||
| 40 | #define CKLED2001_CURRENT_TUNE \ | 40 | #define SNLED27351_CURRENT_TUNE \ |
| 41 | { 0x80, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, 0x80, 0xFF, 0xFF } // 300mA | 41 | { 0x80, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, 0x80, 0xFF, 0xFF } // 300mA |
| 42 | 42 | ||
| 43 | /* EEPROM Driver Configuration */ | 43 | /* EEPROM Driver Configuration */ |
diff --git a/keyboards/keychron/q11/info.json b/keyboards/keychron/q11/info.json index cd2864979d..7a56725324 100755 --- a/keyboards/keychron/q11/info.json +++ b/keyboards/keychron/q11/info.json | |||
| @@ -59,7 +59,7 @@ | |||
| 59 | ] | 59 | ] |
| 60 | }, | 60 | }, |
| 61 | "rgb_matrix": { | 61 | "rgb_matrix": { |
| 62 | "driver": "ckled2001", | 62 | "driver": "snled27351", |
| 63 | "animations": { | 63 | "animations": { |
| 64 | "breathing": true, | 64 | "breathing": true, |
| 65 | "band_spiral_val": true, | 65 | "band_spiral_val": true, |
diff --git a/keyboards/keychron/q11/iso_encoder/iso_encoder.c b/keyboards/keychron/q11/iso_encoder/iso_encoder.c index 08858d9b79..a2db569710 100755 --- a/keyboards/keychron/q11/iso_encoder/iso_encoder.c +++ b/keyboards/keychron/q11/iso_encoder/iso_encoder.c | |||
| @@ -17,8 +17,8 @@ | |||
| 17 | #include "quantum.h" | 17 | #include "quantum.h" |
| 18 | 18 | ||
| 19 | #ifdef RGB_MATRIX_ENABLE | 19 | #ifdef RGB_MATRIX_ENABLE |
| 20 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 20 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 21 | /* Refer to CKLED2001 manual for these locations | 21 | /* Refer to SNLED27351 manual for these locations |
| 22 | * driver | 22 | * driver |
| 23 | * | R location | 23 | * | R location |
| 24 | * | | G location | 24 | * | | G location |
diff --git a/keyboards/keychron/q12/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q12/ansi_encoder/ansi_encoder.c index 2cfaeae8fc..350da52661 100644 --- a/keyboards/keychron/q12/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/q12/ansi_encoder/ansi_encoder.c | |||
| @@ -17,8 +17,8 @@ | |||
| 17 | #include "quantum.h" | 17 | #include "quantum.h" |
| 18 | 18 | ||
| 19 | #ifdef RGB_MATRIX_ENABLE | 19 | #ifdef RGB_MATRIX_ENABLE |
| 20 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 20 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 21 | /* Refer to IS31 manual for these locations | 21 | /* Refer to SNLED27351 manual for these locations |
| 22 | * driver | 22 | * driver |
| 23 | * | R location | 23 | * | R location |
| 24 | * | | G location | 24 | * | | G location |
diff --git a/keyboards/keychron/q12/ansi_encoder/info.json b/keyboards/keychron/q12/ansi_encoder/info.json index 97c1334ffd..291fd1774c 100644 --- a/keyboards/keychron/q12/ansi_encoder/info.json +++ b/keyboards/keychron/q12/ansi_encoder/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "encoder": { | 14 | "encoder": { |
| 15 | "rotary": [ | 15 | "rotary": [ |
diff --git a/keyboards/keychron/q12/config.h b/keyboards/keychron/q12/config.h index 52c4ade5a6..1114c966aa 100644 --- a/keyboards/keychron/q12/config.h +++ b/keyboards/keychron/q12/config.h | |||
| @@ -26,9 +26,9 @@ | |||
| 26 | #define DIODE_DIRECTION ROW2COL | 26 | #define DIODE_DIRECTION ROW2COL |
| 27 | 27 | ||
| 28 | /* RGB Matrix Driver Configuration */ | 28 | /* RGB Matrix Driver Configuration */ |
| 29 | #define CKLED2001_DRIVER_COUNT 2 | 29 | #define SNLED27351_DRIVER_COUNT 2 |
| 30 | #define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO | 30 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO |
| 31 | #define DRIVER_ADDR_2 CKLED2001_I2C_ADDRESS_GND | 31 | #define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_GND |
| 32 | 32 | ||
| 33 | /* Increase I2C speed to 1000 KHz */ | 33 | /* Increase I2C speed to 1000 KHz */ |
| 34 | #define I2C1_TIMINGR_PRESC 0U | 34 | #define I2C1_TIMINGR_PRESC 0U |
| @@ -37,7 +37,7 @@ | |||
| 37 | #define I2C1_TIMINGR_SCLH 15U | 37 | #define I2C1_TIMINGR_SCLH 15U |
| 38 | #define I2C1_TIMINGR_SCLL 51U | 38 | #define I2C1_TIMINGR_SCLL 51U |
| 39 | 39 | ||
| 40 | #define CKLED2001_CURRENT_TUNE \ | 40 | #define SNLED27351_CURRENT_TUNE \ |
| 41 | { 0xAD, 0xAD, 0x55, 0xAD, 0xAD, 0x55, 0xAD, 0xAD, 0x55, 0xAD, 0xAD, 0x55 } | 41 | { 0xAD, 0xAD, 0x55, 0xAD, 0xAD, 0x55, 0xAD, 0xAD, 0x55, 0xAD, 0xAD, 0x55 } |
| 42 | 42 | ||
| 43 | /* DIP switch */ | 43 | /* DIP switch */ |
diff --git a/keyboards/keychron/q12/iso_encoder/info.json b/keyboards/keychron/q12/iso_encoder/info.json index cd848c86b6..edd0d0ea43 100644 --- a/keyboards/keychron/q12/iso_encoder/info.json +++ b/keyboards/keychron/q12/iso_encoder/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "encoder": { | 14 | "encoder": { |
| 15 | "rotary": [ | 15 | "rotary": [ |
diff --git a/keyboards/keychron/q12/iso_encoder/iso_encoder.c b/keyboards/keychron/q12/iso_encoder/iso_encoder.c index 8090649d33..37d9db10b4 100644 --- a/keyboards/keychron/q12/iso_encoder/iso_encoder.c +++ b/keyboards/keychron/q12/iso_encoder/iso_encoder.c | |||
| @@ -18,8 +18,8 @@ | |||
| 18 | 18 | ||
| 19 | #ifdef RGB_MATRIX_ENABLE | 19 | #ifdef RGB_MATRIX_ENABLE |
| 20 | 20 | ||
| 21 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 21 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 22 | /* Refer to IS31 manual for these locations | 22 | /* Refer to SNLED27351 manual for these locations |
| 23 | * driver | 23 | * driver |
| 24 | * | R location | 24 | * | R location |
| 25 | * | | G location | 25 | * | | G location |
diff --git a/keyboards/keychron/q2/ansi/ansi.c b/keyboards/keychron/q2/ansi/ansi.c index baf12d3df0..d0ff0a1869 100644 --- a/keyboards/keychron/q2/ansi/ansi.c +++ b/keyboards/keychron/q2/ansi/ansi.c | |||
| @@ -17,8 +17,8 @@ | |||
| 17 | #include "quantum.h" | 17 | #include "quantum.h" |
| 18 | 18 | ||
| 19 | #ifdef RGB_MATRIX_ENABLE | 19 | #ifdef RGB_MATRIX_ENABLE |
| 20 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 20 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 21 | /* Refer to CKLED manual for these locations | 21 | /* Refer to SNLED27351 manual for these locations |
| 22 | * driver | 22 | * driver |
| 23 | * | R location | 23 | * | R location |
| 24 | * | | G location | 24 | * | | G location |
diff --git a/keyboards/keychron/q2/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q2/ansi_encoder/ansi_encoder.c index baf12d3df0..d0ff0a1869 100644 --- a/keyboards/keychron/q2/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/q2/ansi_encoder/ansi_encoder.c | |||
| @@ -17,8 +17,8 @@ | |||
| 17 | #include "quantum.h" | 17 | #include "quantum.h" |
| 18 | 18 | ||
| 19 | #ifdef RGB_MATRIX_ENABLE | 19 | #ifdef RGB_MATRIX_ENABLE |
| 20 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 20 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 21 | /* Refer to CKLED manual for these locations | 21 | /* Refer to SNLED27351 manual for these locations |
| 22 | * driver | 22 | * driver |
| 23 | * | R location | 23 | * | R location |
| 24 | * | | G location | 24 | * | | G location |
diff --git a/keyboards/keychron/q2/config.h b/keyboards/keychron/q2/config.h index b6b2e8356a..9b17851400 100644 --- a/keyboards/keychron/q2/config.h +++ b/keyboards/keychron/q2/config.h | |||
| @@ -22,11 +22,11 @@ | |||
| 22 | #define DIP_SWITCH_MATRIX_GRID { {4, 4} } | 22 | #define DIP_SWITCH_MATRIX_GRID { {4, 4} } |
| 23 | 23 | ||
| 24 | /* RGB Matrix Driver Configuration */ | 24 | /* RGB Matrix Driver Configuration */ |
| 25 | #define CKLED2001_DRIVER_COUNT 2 | 25 | #define SNLED27351_DRIVER_COUNT 2 |
| 26 | #define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO | 26 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO |
| 27 | #define DRIVER_ADDR_2 CKLED2001_I2C_ADDRESS_GND | 27 | #define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_GND |
| 28 | 28 | ||
| 29 | #define CKLED2001_PHASE_CHANNEL CKLED2001_MSKPHASE_9CHANNEL | 29 | #define SNLED27351_PHASE_CHANNEL SNLED27351_MSKPHASE_9CHANNEL |
| 30 | 30 | ||
| 31 | /* Disable DIP switch in matrix data */ | 31 | /* Disable DIP switch in matrix data */ |
| 32 | #define MATRIX_MASKED | 32 | #define MATRIX_MASKED |
diff --git a/keyboards/keychron/q2/info.json b/keyboards/keychron/q2/info.json index 7667ac5b28..47d9aa83b1 100644 --- a/keyboards/keychron/q2/info.json +++ b/keyboards/keychron/q2/info.json | |||
| @@ -51,7 +51,7 @@ | |||
| 51 | "splash": true, | 51 | "splash": true, |
| 52 | "typing_heatmap": true | 52 | "typing_heatmap": true |
| 53 | }, | 53 | }, |
| 54 | "driver": "ckled2001" | 54 | "driver": "snled27351" |
| 55 | }, | 55 | }, |
| 56 | "url": "https://github.com/Keychron", | 56 | "url": "https://github.com/Keychron", |
| 57 | "usb": { | 57 | "usb": { |
diff --git a/keyboards/keychron/q2/iso/iso.c b/keyboards/keychron/q2/iso/iso.c index c852b8d0cb..a54c90bc4b 100644 --- a/keyboards/keychron/q2/iso/iso.c +++ b/keyboards/keychron/q2/iso/iso.c | |||
| @@ -17,8 +17,8 @@ | |||
| 17 | #include "quantum.h" | 17 | #include "quantum.h" |
| 18 | 18 | ||
| 19 | #ifdef RGB_MATRIX_ENABLE | 19 | #ifdef RGB_MATRIX_ENABLE |
| 20 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 20 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 21 | /* Refer to IS31 manual for these locations | 21 | /* Refer to SNLED27351 manual for these locations |
| 22 | * driver | 22 | * driver |
| 23 | * | R location | 23 | * | R location |
| 24 | * | | G location | 24 | * | | G location |
diff --git a/keyboards/keychron/q2/iso_encoder/iso_encoder.c b/keyboards/keychron/q2/iso_encoder/iso_encoder.c index c852b8d0cb..a54c90bc4b 100644 --- a/keyboards/keychron/q2/iso_encoder/iso_encoder.c +++ b/keyboards/keychron/q2/iso_encoder/iso_encoder.c | |||
| @@ -17,8 +17,8 @@ | |||
| 17 | #include "quantum.h" | 17 | #include "quantum.h" |
| 18 | 18 | ||
| 19 | #ifdef RGB_MATRIX_ENABLE | 19 | #ifdef RGB_MATRIX_ENABLE |
| 20 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 20 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 21 | /* Refer to IS31 manual for these locations | 21 | /* Refer to SNLED27351 manual for these locations |
| 22 | * driver | 22 | * driver |
| 23 | * | R location | 23 | * | R location |
| 24 | * | | G location | 24 | * | | G location |
diff --git a/keyboards/keychron/q2/jis/config.h b/keyboards/keychron/q2/jis/config.h index fa6fc4e91a..0d811e0845 100644 --- a/keyboards/keychron/q2/jis/config.h +++ b/keyboards/keychron/q2/jis/config.h | |||
| @@ -19,7 +19,7 @@ | |||
| 19 | /* RGB Matrix Configuration */ | 19 | /* RGB Matrix Configuration */ |
| 20 | #define RGB_MATRIX_LED_COUNT 71 | 20 | #define RGB_MATRIX_LED_COUNT 71 |
| 21 | 21 | ||
| 22 | #define CKLED2001_CURRENT_TUNE { 0xC0, 0xC0, 0x5D, 0xC0, 0xC0, 0x5D, 0xC0, 0xC0, 0x5D, 0xC0, 0xC0, 0x5D } | 22 | #define SNLED27351_CURRENT_TUNE { 0xC0, 0xC0, 0x5D, 0xC0, 0xC0, 0x5D, 0xC0, 0xC0, 0x5D, 0xC0, 0xC0, 0x5D } |
| 23 | 23 | ||
| 24 | /* Enable caps-lock LED */ | 24 | /* Enable caps-lock LED */ |
| 25 | #define CAPS_LOCK_LED_INDEX 30 | 25 | #define CAPS_LOCK_LED_INDEX 30 |
diff --git a/keyboards/keychron/q2/jis/jis.c b/keyboards/keychron/q2/jis/jis.c index 9d8f439d6f..d877e225d9 100644 --- a/keyboards/keychron/q2/jis/jis.c +++ b/keyboards/keychron/q2/jis/jis.c | |||
| @@ -18,8 +18,8 @@ | |||
| 18 | 18 | ||
| 19 | #ifdef RGB_MATRIX_ENABLE | 19 | #ifdef RGB_MATRIX_ENABLE |
| 20 | 20 | ||
| 21 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 21 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 22 | /* Refer to IS31 manual for these locations | 22 | /* Refer to SNLED27351 manual for these locations |
| 23 | * driver | 23 | * driver |
| 24 | * | R location | 24 | * | R location |
| 25 | * | | G location | 25 | * | | G location |
diff --git a/keyboards/keychron/q2/jis_encoder/config.h b/keyboards/keychron/q2/jis_encoder/config.h index fa6fc4e91a..0d811e0845 100644 --- a/keyboards/keychron/q2/jis_encoder/config.h +++ b/keyboards/keychron/q2/jis_encoder/config.h | |||
| @@ -19,7 +19,7 @@ | |||
| 19 | /* RGB Matrix Configuration */ | 19 | /* RGB Matrix Configuration */ |
| 20 | #define RGB_MATRIX_LED_COUNT 71 | 20 | #define RGB_MATRIX_LED_COUNT 71 |
| 21 | 21 | ||
| 22 | #define CKLED2001_CURRENT_TUNE { 0xC0, 0xC0, 0x5D, 0xC0, 0xC0, 0x5D, 0xC0, 0xC0, 0x5D, 0xC0, 0xC0, 0x5D } | 22 | #define SNLED27351_CURRENT_TUNE { 0xC0, 0xC0, 0x5D, 0xC0, 0xC0, 0x5D, 0xC0, 0xC0, 0x5D, 0xC0, 0xC0, 0x5D } |
| 23 | 23 | ||
| 24 | /* Enable caps-lock LED */ | 24 | /* Enable caps-lock LED */ |
| 25 | #define CAPS_LOCK_LED_INDEX 30 | 25 | #define CAPS_LOCK_LED_INDEX 30 |
diff --git a/keyboards/keychron/q2/jis_encoder/jis_encoder.c b/keyboards/keychron/q2/jis_encoder/jis_encoder.c index 9d8f439d6f..d877e225d9 100644 --- a/keyboards/keychron/q2/jis_encoder/jis_encoder.c +++ b/keyboards/keychron/q2/jis_encoder/jis_encoder.c | |||
| @@ -18,8 +18,8 @@ | |||
| 18 | 18 | ||
| 19 | #ifdef RGB_MATRIX_ENABLE | 19 | #ifdef RGB_MATRIX_ENABLE |
| 20 | 20 | ||
| 21 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 21 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 22 | /* Refer to IS31 manual for these locations | 22 | /* Refer to SNLED27351 manual for these locations |
| 23 | * driver | 23 | * driver |
| 24 | * | R location | 24 | * | R location |
| 25 | * | | G location | 25 | * | | G location |
diff --git a/keyboards/keychron/q3/ansi/ansi.c b/keyboards/keychron/q3/ansi/ansi.c index 220cfcb98d..8327ee430b 100644 --- a/keyboards/keychron/q3/ansi/ansi.c +++ b/keyboards/keychron/q3/ansi/ansi.c | |||
| @@ -18,8 +18,8 @@ | |||
| 18 | 18 | ||
| 19 | #ifdef RGB_MATRIX_ENABLE | 19 | #ifdef RGB_MATRIX_ENABLE |
| 20 | 20 | ||
| 21 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 21 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 22 | /* Refer to IS31 manual for these locations | 22 | /* Refer to SNLED27351 manual for these locations |
| 23 | * driver | 23 | * driver |
| 24 | * | R location | 24 | * | R location |
| 25 | * | | G location | 25 | * | | G location |
diff --git a/keyboards/keychron/q3/ansi/config.h b/keyboards/keychron/q3/ansi/config.h index 89300267be..77afc9b9b6 100644 --- a/keyboards/keychron/q3/ansi/config.h +++ b/keyboards/keychron/q3/ansi/config.h | |||
| @@ -22,7 +22,7 @@ | |||
| 22 | /* RGB Matrix Configuration */ | 22 | /* RGB Matrix Configuration */ |
| 23 | #define RGB_MATRIX_LED_COUNT 87 | 23 | #define RGB_MATRIX_LED_COUNT 87 |
| 24 | 24 | ||
| 25 | #define CKLED2001_CURRENT_TUNE \ | 25 | #define SNLED27351_CURRENT_TUNE \ |
| 26 | { 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44 } | 26 | { 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44 } |
| 27 | 27 | ||
| 28 | /* Enable CapsLcok LED */ | 28 | /* Enable CapsLcok LED */ |
diff --git a/keyboards/keychron/q3/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q3/ansi_encoder/ansi_encoder.c index 3bee55a63c..a386e87a01 100644 --- a/keyboards/keychron/q3/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/q3/ansi_encoder/ansi_encoder.c | |||
| @@ -18,8 +18,8 @@ | |||
| 18 | 18 | ||
| 19 | #ifdef RGB_MATRIX_ENABLE | 19 | #ifdef RGB_MATRIX_ENABLE |
| 20 | 20 | ||
| 21 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 21 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 22 | /* Refer to IS31 manual for these locations | 22 | /* Refer to SNLED27351 manual for these locations |
| 23 | * driver | 23 | * driver |
| 24 | * | R location | 24 | * | R location |
| 25 | * | | G location | 25 | * | | G location |
diff --git a/keyboards/keychron/q3/ansi_encoder/config.h b/keyboards/keychron/q3/ansi_encoder/config.h index 78c82969d0..2a6f9ba4c5 100644 --- a/keyboards/keychron/q3/ansi_encoder/config.h +++ b/keyboards/keychron/q3/ansi_encoder/config.h | |||
| @@ -23,7 +23,7 @@ | |||
| 23 | /* RGB Matrix Configuration */ | 23 | /* RGB Matrix Configuration */ |
| 24 | #define RGB_MATRIX_LED_COUNT 87 | 24 | #define RGB_MATRIX_LED_COUNT 87 |
| 25 | 25 | ||
| 26 | #define CKLED2001_CURRENT_TUNE \ | 26 | #define SNLED27351_CURRENT_TUNE \ |
| 27 | { 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44 } | 27 | { 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44 } |
| 28 | 28 | ||
| 29 | /* Enable CapsLcok LED */ | 29 | /* Enable CapsLcok LED */ |
diff --git a/keyboards/keychron/q3/config.h b/keyboards/keychron/q3/config.h index 28328358e9..035aea2bb3 100644 --- a/keyboards/keychron/q3/config.h +++ b/keyboards/keychron/q3/config.h | |||
| @@ -17,9 +17,9 @@ | |||
| 17 | #pragma once | 17 | #pragma once |
| 18 | 18 | ||
| 19 | /* RGB Matrix Driver Configuration */ | 19 | /* RGB Matrix Driver Configuration */ |
| 20 | #define CKLED2001_DRIVER_COUNT 2 | 20 | #define SNLED27351_DRIVER_COUNT 2 |
| 21 | #define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO | 21 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO |
| 22 | #define DRIVER_ADDR_2 CKLED2001_I2C_ADDRESS_GND | 22 | #define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_GND |
| 23 | 23 | ||
| 24 | /* Increase I2C speed to 1000 KHz */ | 24 | /* Increase I2C speed to 1000 KHz */ |
| 25 | #define I2C1_TIMINGR_PRESC 0U | 25 | #define I2C1_TIMINGR_PRESC 0U |
| @@ -28,7 +28,7 @@ | |||
| 28 | #define I2C1_TIMINGR_SCLH 15U | 28 | #define I2C1_TIMINGR_SCLH 15U |
| 29 | #define I2C1_TIMINGR_SCLL 51U | 29 | #define I2C1_TIMINGR_SCLL 51U |
| 30 | 30 | ||
| 31 | #define CKLED2001_PHASE_CHANNEL CKLED2001_MSKPHASE_9CHANNEL | 31 | #define SNLED27351_PHASE_CHANNEL SNLED27351_MSKPHASE_9CHANNEL |
| 32 | 32 | ||
| 33 | /* DIP switch */ | 33 | /* DIP switch */ |
| 34 | #define DIP_SWITCH_MATRIX_GRID { {5, 4} } | 34 | #define DIP_SWITCH_MATRIX_GRID { {5, 4} } |
diff --git a/keyboards/keychron/q3/info.json b/keyboards/keychron/q3/info.json index 835aea4504..c08d73f26a 100644 --- a/keyboards/keychron/q3/info.json +++ b/keyboards/keychron/q3/info.json | |||
| @@ -43,7 +43,7 @@ | |||
| 43 | "splash": true, | 43 | "splash": true, |
| 44 | "typing_heatmap": true | 44 | "typing_heatmap": true |
| 45 | }, | 45 | }, |
| 46 | "driver": "ckled2001" | 46 | "driver": "snled27351" |
| 47 | }, | 47 | }, |
| 48 | "url": "https://github.com/Keychron", | 48 | "url": "https://github.com/Keychron", |
| 49 | "usb": { | 49 | "usb": { |
diff --git a/keyboards/keychron/q3/iso/config.h b/keyboards/keychron/q3/iso/config.h index eb141cb270..3ffda1ce1e 100644 --- a/keyboards/keychron/q3/iso/config.h +++ b/keyboards/keychron/q3/iso/config.h | |||
| @@ -22,7 +22,7 @@ | |||
| 22 | /* RGB Matrix Configuration */ | 22 | /* RGB Matrix Configuration */ |
| 23 | #define RGB_MATRIX_LED_COUNT 88 | 23 | #define RGB_MATRIX_LED_COUNT 88 |
| 24 | 24 | ||
| 25 | #define CKLED2001_CURRENT_TUNE \ | 25 | #define SNLED27351_CURRENT_TUNE \ |
| 26 | { 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44 } | 26 | { 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44 } |
| 27 | 27 | ||
| 28 | /* Enable caps-lock LED */ | 28 | /* Enable caps-lock LED */ |
diff --git a/keyboards/keychron/q3/iso/iso.c b/keyboards/keychron/q3/iso/iso.c index 1c179a34b4..725af67006 100644 --- a/keyboards/keychron/q3/iso/iso.c +++ b/keyboards/keychron/q3/iso/iso.c | |||
| @@ -18,8 +18,8 @@ | |||
| 18 | 18 | ||
| 19 | #ifdef RGB_MATRIX_ENABLE | 19 | #ifdef RGB_MATRIX_ENABLE |
| 20 | 20 | ||
| 21 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 21 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 22 | /* Refer to IS31 manual for these locations | 22 | /* Refer to SNLED27351 manual for these locations |
| 23 | * driver | 23 | * driver |
| 24 | * | R location | 24 | * | R location |
| 25 | * | | G location | 25 | * | | G location |
diff --git a/keyboards/keychron/q3/iso_encoder/config.h b/keyboards/keychron/q3/iso_encoder/config.h index 050c940054..6893c2e8ff 100644 --- a/keyboards/keychron/q3/iso_encoder/config.h +++ b/keyboards/keychron/q3/iso_encoder/config.h | |||
| @@ -23,7 +23,7 @@ | |||
| 23 | /* RGB Matrix Configuration */ | 23 | /* RGB Matrix Configuration */ |
| 24 | #define RGB_MATRIX_LED_COUNT 88 | 24 | #define RGB_MATRIX_LED_COUNT 88 |
| 25 | 25 | ||
| 26 | #define CKLED2001_CURRENT_TUNE \ | 26 | #define SNLED27351_CURRENT_TUNE \ |
| 27 | { 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44 } | 27 | { 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44 } |
| 28 | 28 | ||
| 29 | /* Enable caps-lock LED */ | 29 | /* Enable caps-lock LED */ |
diff --git a/keyboards/keychron/q3/iso_encoder/iso_encoder.c b/keyboards/keychron/q3/iso_encoder/iso_encoder.c index 1c179a34b4..725af67006 100644 --- a/keyboards/keychron/q3/iso_encoder/iso_encoder.c +++ b/keyboards/keychron/q3/iso_encoder/iso_encoder.c | |||
| @@ -18,8 +18,8 @@ | |||
| 18 | 18 | ||
| 19 | #ifdef RGB_MATRIX_ENABLE | 19 | #ifdef RGB_MATRIX_ENABLE |
| 20 | 20 | ||
| 21 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 21 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 22 | /* Refer to IS31 manual for these locations | 22 | /* Refer to SNLED27351 manual for these locations |
| 23 | * driver | 23 | * driver |
| 24 | * | R location | 24 | * | R location |
| 25 | * | | G location | 25 | * | | G location |
diff --git a/keyboards/keychron/q3/jis/config.h b/keyboards/keychron/q3/jis/config.h index 026fe54568..1ea4386bba 100644 --- a/keyboards/keychron/q3/jis/config.h +++ b/keyboards/keychron/q3/jis/config.h | |||
| @@ -22,7 +22,7 @@ | |||
| 22 | /* RGB Matrix Configuration */ | 22 | /* RGB Matrix Configuration */ |
| 23 | #define RGB_MATRIX_LED_COUNT 91 | 23 | #define RGB_MATRIX_LED_COUNT 91 |
| 24 | 24 | ||
| 25 | #define CKLED2001_CURRENT_TUNE \ | 25 | #define SNLED27351_CURRENT_TUNE \ |
| 26 | { 0x94, 0x94, 0x44, 0x94, 0x94, 0x44, 0x94, 0x94, 0x44, 0x94, 0x94, 0x44 } | 26 | { 0x94, 0x94, 0x44, 0x94, 0x94, 0x44, 0x94, 0x94, 0x44, 0x94, 0x94, 0x44 } |
| 27 | 27 | ||
| 28 | /* Enable CapsLcok LED */ | 28 | /* Enable CapsLcok LED */ |
diff --git a/keyboards/keychron/q3/jis/jis.c b/keyboards/keychron/q3/jis/jis.c index 9b10f1d103..4b19eca52f 100644 --- a/keyboards/keychron/q3/jis/jis.c +++ b/keyboards/keychron/q3/jis/jis.c | |||
| @@ -18,8 +18,8 @@ | |||
| 18 | 18 | ||
| 19 | #ifdef RGB_MATRIX_ENABLE | 19 | #ifdef RGB_MATRIX_ENABLE |
| 20 | 20 | ||
| 21 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 21 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 22 | /* Refer to IS31 manual for these locations | 22 | /* Refer to SNLED27351 manual for these locations |
| 23 | * driver | 23 | * driver |
| 24 | * | R location | 24 | * | R location |
| 25 | * | | G location | 25 | * | | G location |
diff --git a/keyboards/keychron/q3/jis_encoder/config.h b/keyboards/keychron/q3/jis_encoder/config.h index 13f132c02c..5c5efb4ff6 100644 --- a/keyboards/keychron/q3/jis_encoder/config.h +++ b/keyboards/keychron/q3/jis_encoder/config.h | |||
| @@ -23,7 +23,7 @@ | |||
| 23 | /* RGB Matrix Configuration */ | 23 | /* RGB Matrix Configuration */ |
| 24 | #define RGB_MATRIX_LED_COUNT 92 | 24 | #define RGB_MATRIX_LED_COUNT 92 |
| 25 | 25 | ||
| 26 | #define CKLED2001_CURRENT_TUNE \ | 26 | #define SNLED27351_CURRENT_TUNE \ |
| 27 | { 0x94, 0x94, 0x44, 0x94, 0x94, 0x44, 0x94, 0x94, 0x44, 0x94, 0x94, 0x44 } | 27 | { 0x94, 0x94, 0x44, 0x94, 0x94, 0x44, 0x94, 0x94, 0x44, 0x94, 0x94, 0x44 } |
| 28 | 28 | ||
| 29 | /* Enable CapsLcok LED */ | 29 | /* Enable CapsLcok LED */ |
diff --git a/keyboards/keychron/q3/jis_encoder/jis_encoder.c b/keyboards/keychron/q3/jis_encoder/jis_encoder.c index 1515e9a353..8770f9d33c 100644 --- a/keyboards/keychron/q3/jis_encoder/jis_encoder.c +++ b/keyboards/keychron/q3/jis_encoder/jis_encoder.c | |||
| @@ -18,8 +18,8 @@ | |||
| 18 | 18 | ||
| 19 | #ifdef RGB_MATRIX_ENABLE | 19 | #ifdef RGB_MATRIX_ENABLE |
| 20 | 20 | ||
| 21 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 21 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 22 | /* Refer to IS31 manual for these locations | 22 | /* Refer to SNLED27351 manual for these locations |
| 23 | * driver | 23 | * driver |
| 24 | * | R location | 24 | * | R location |
| 25 | * | | G location | 25 | * | | G location |
diff --git a/keyboards/keychron/q4/ansi_v1/ansi_v1.c b/keyboards/keychron/q4/ansi_v1/ansi_v1.c index 88599103ef..953da2df8b 100644 --- a/keyboards/keychron/q4/ansi_v1/ansi_v1.c +++ b/keyboards/keychron/q4/ansi_v1/ansi_v1.c | |||
| @@ -18,8 +18,8 @@ | |||
| 18 | 18 | ||
| 19 | #ifdef RGB_MATRIX_ENABLE | 19 | #ifdef RGB_MATRIX_ENABLE |
| 20 | 20 | ||
| 21 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 21 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 22 | /* Refer to CKLED manual for these locations | 22 | /* Refer to SNLED27351 manual for these locations |
| 23 | * driver | 23 | * driver |
| 24 | * | R location | 24 | * | R location |
| 25 | * | | G location | 25 | * | | G location |
diff --git a/keyboards/keychron/q4/ansi_v1/config.h b/keyboards/keychron/q4/ansi_v1/config.h index cf12c75966..1bd02e42a6 100644 --- a/keyboards/keychron/q4/ansi_v1/config.h +++ b/keyboards/keychron/q4/ansi_v1/config.h | |||
| @@ -17,17 +17,17 @@ | |||
| 17 | #pragma once | 17 | #pragma once |
| 18 | 18 | ||
| 19 | /* RGB Matrix Driver Configuration */ | 19 | /* RGB Matrix Driver Configuration */ |
| 20 | #define CKLED2001_DRIVER_COUNT 2 | 20 | #define SNLED27351_DRIVER_COUNT 2 |
| 21 | #define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO | 21 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO |
| 22 | #define DRIVER_ADDR_2 CKLED2001_I2C_ADDRESS_GND | 22 | #define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_GND |
| 23 | 23 | ||
| 24 | /* RGB Matrix Configuration */ | 24 | /* RGB Matrix Configuration */ |
| 25 | #define DRIVER_1_LED_TOTAL 31 | 25 | #define DRIVER_1_LED_TOTAL 31 |
| 26 | #define DRIVER_2_LED_TOTAL 30 | 26 | #define DRIVER_2_LED_TOTAL 30 |
| 27 | #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) | 27 | #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) |
| 28 | 28 | ||
| 29 | #define CKLED2001_PHASE_CHANNEL CKLED2001_MSKPHASE_9CHANNEL | 29 | #define SNLED27351_PHASE_CHANNEL SNLED27351_MSKPHASE_9CHANNEL |
| 30 | #define CKLED2001_CURRENT_TUNE \ | 30 | #define SNLED27351_CURRENT_TUNE \ |
| 31 | { 0xCA, 0xCA, 0x60, 0xCA, 0xCA, 0x60, 0xCA, 0xCA, 0x60, 0xCA, 0xCA, 0x60 } | 31 | { 0xCA, 0xCA, 0x60, 0xCA, 0xCA, 0x60, 0xCA, 0xCA, 0x60, 0xCA, 0xCA, 0x60 } |
| 32 | 32 | ||
| 33 | /* Enable CapsLcok LED*/ | 33 | /* Enable CapsLcok LED*/ |
diff --git a/keyboards/keychron/q4/ansi_v1/info.json b/keyboards/keychron/q4/ansi_v1/info.json index 8ee286c481..78226e1985 100644 --- a/keyboards/keychron/q4/ansi_v1/info.json +++ b/keyboards/keychron/q4/ansi_v1/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "matrix_pins": { | 14 | "matrix_pins": { |
| 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9"], | 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9"], |
diff --git a/keyboards/keychron/q4/ansi_v2/ansi_v2.c b/keyboards/keychron/q4/ansi_v2/ansi_v2.c index d454a796fa..b09fb7810a 100644 --- a/keyboards/keychron/q4/ansi_v2/ansi_v2.c +++ b/keyboards/keychron/q4/ansi_v2/ansi_v2.c | |||
| @@ -18,8 +18,8 @@ | |||
| 18 | 18 | ||
| 19 | #ifdef RGB_MATRIX_ENABLE | 19 | #ifdef RGB_MATRIX_ENABLE |
| 20 | 20 | ||
| 21 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 21 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 22 | /* Refer to CKLED manual for these locations | 22 | /* Refer to SNLED27351 manual for these locations |
| 23 | * driver | 23 | * driver |
| 24 | * | R location | 24 | * | R location |
| 25 | * | | G location | 25 | * | | G location |
diff --git a/keyboards/keychron/q4/ansi_v2/config.h b/keyboards/keychron/q4/ansi_v2/config.h index 1bcaf204ef..ea9b45607e 100644 --- a/keyboards/keychron/q4/ansi_v2/config.h +++ b/keyboards/keychron/q4/ansi_v2/config.h | |||
| @@ -17,14 +17,14 @@ | |||
| 17 | #pragma once | 17 | #pragma once |
| 18 | 18 | ||
| 19 | /* RGB Matrix Driver Configuration */ | 19 | /* RGB Matrix Driver Configuration */ |
| 20 | #define CKLED2001_DRIVER_COUNT 1 | 20 | #define SNLED27351_DRIVER_COUNT 1 |
| 21 | #define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_GND | 21 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_GND |
| 22 | 22 | ||
| 23 | /* RGB Matrix Configuration */ | 23 | /* RGB Matrix Configuration */ |
| 24 | #define DRIVER_1_LED_TOTAL 61 | 24 | #define DRIVER_1_LED_TOTAL 61 |
| 25 | #define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL | 25 | #define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL |
| 26 | 26 | ||
| 27 | #define CKLED2001_CURRENT_TUNE \ | 27 | #define SNLED27351_CURRENT_TUNE \ |
| 28 | { 0xCA, 0xCA, 0x60, 0xCA, 0xCA, 0x60, 0xCA, 0xCA, 0x60, 0xCA, 0xCA, 0x60 } | 28 | { 0xCA, 0xCA, 0x60, 0xCA, 0xCA, 0x60, 0xCA, 0xCA, 0x60, 0xCA, 0xCA, 0x60 } |
| 29 | 29 | ||
| 30 | /* Enable CapsLcok LED*/ | 30 | /* Enable CapsLcok LED*/ |
diff --git a/keyboards/keychron/q4/ansi_v2/info.json b/keyboards/keychron/q4/ansi_v2/info.json index 8ee286c481..78226e1985 100644 --- a/keyboards/keychron/q4/ansi_v2/info.json +++ b/keyboards/keychron/q4/ansi_v2/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "matrix_pins": { | 14 | "matrix_pins": { |
| 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9"], | 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9"], |
diff --git a/keyboards/keychron/q4/iso/config.h b/keyboards/keychron/q4/iso/config.h index b61f8be4a4..e8aed1af0f 100644 --- a/keyboards/keychron/q4/iso/config.h +++ b/keyboards/keychron/q4/iso/config.h | |||
| @@ -17,14 +17,14 @@ | |||
| 17 | #pragma once | 17 | #pragma once |
| 18 | 18 | ||
| 19 | /* RGB Matrix Driver Configuration */ | 19 | /* RGB Matrix Driver Configuration */ |
| 20 | #define CKLED2001_DRIVER_COUNT 1 | 20 | #define SNLED27351_DRIVER_COUNT 1 |
| 21 | #define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_GND | 21 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_GND |
| 22 | 22 | ||
| 23 | /* RGB Matrix Configuration */ | 23 | /* RGB Matrix Configuration */ |
| 24 | #define DRIVER_1_LED_TOTAL 62 | 24 | #define DRIVER_1_LED_TOTAL 62 |
| 25 | #define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL | 25 | #define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL |
| 26 | 26 | ||
| 27 | #define CKLED2001_CURRENT_TUNE \ | 27 | #define SNLED27351_CURRENT_TUNE \ |
| 28 | { 0xCA, 0xCA, 0x60, 0xCA, 0xCA, 0x60, 0xCA, 0xCA, 0x60, 0xCA, 0xCA, 0x60 } | 28 | { 0xCA, 0xCA, 0x60, 0xCA, 0xCA, 0x60, 0xCA, 0xCA, 0x60, 0xCA, 0xCA, 0x60 } |
| 29 | 29 | ||
| 30 | /* Enable CapsLcok LED*/ | 30 | /* Enable CapsLcok LED*/ |
diff --git a/keyboards/keychron/q4/iso/info.json b/keyboards/keychron/q4/iso/info.json index f8945cda61..7143fba9b1 100644 --- a/keyboards/keychron/q4/iso/info.json +++ b/keyboards/keychron/q4/iso/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "matrix_pins": { | 14 | "matrix_pins": { |
| 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9"], | 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9"], |
diff --git a/keyboards/keychron/q4/iso/iso.c b/keyboards/keychron/q4/iso/iso.c index 24cbcfd745..a7c42914d2 100644 --- a/keyboards/keychron/q4/iso/iso.c +++ b/keyboards/keychron/q4/iso/iso.c | |||
| @@ -18,8 +18,8 @@ | |||
| 18 | 18 | ||
| 19 | #ifdef RGB_MATRIX_ENABLE | 19 | #ifdef RGB_MATRIX_ENABLE |
| 20 | 20 | ||
| 21 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 21 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 22 | /* Refer to CKLED manual for these locations | 22 | /* Refer to SNLED27351 manual for these locations |
| 23 | * driver | 23 | * driver |
| 24 | * | R location | 24 | * | R location |
| 25 | * | | G location | 25 | * | | G location |
diff --git a/keyboards/keychron/q5/ansi/ansi.c b/keyboards/keychron/q5/ansi/ansi.c index dda563cd79..8c80245fbc 100644 --- a/keyboards/keychron/q5/ansi/ansi.c +++ b/keyboards/keychron/q5/ansi/ansi.c | |||
| @@ -18,8 +18,8 @@ | |||
| 18 | 18 | ||
| 19 | #ifdef RGB_MATRIX_ENABLE | 19 | #ifdef RGB_MATRIX_ENABLE |
| 20 | 20 | ||
| 21 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 21 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 22 | /* Refer to IS31 manual for these locations | 22 | /* Refer to SNLED27351 manual for these locations |
| 23 | * driver | 23 | * driver |
| 24 | * | R location | 24 | * | R location |
| 25 | * | | G location | 25 | * | | G location |
diff --git a/keyboards/keychron/q5/ansi/info.json b/keyboards/keychron/q5/ansi/info.json index 55d7ae0165..8795957c45 100644 --- a/keyboards/keychron/q5/ansi/info.json +++ b/keyboards/keychron/q5/ansi/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "processor": "STM32L432", | 14 | "processor": "STM32L432", |
| 15 | "bootloader": "stm32-dfu", | 15 | "bootloader": "stm32-dfu", |
diff --git a/keyboards/keychron/q5/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q5/ansi_encoder/ansi_encoder.c index 4d3cc0f036..d5f67f1297 100644 --- a/keyboards/keychron/q5/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/q5/ansi_encoder/ansi_encoder.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to IS31 manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/q5/ansi_encoder/info.json b/keyboards/keychron/q5/ansi_encoder/info.json index 468261b1e9..ae4a58e55d 100644 --- a/keyboards/keychron/q5/ansi_encoder/info.json +++ b/keyboards/keychron/q5/ansi_encoder/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "encoder": { | 14 | "encoder": { |
| 15 | "rotary": [ | 15 | "rotary": [ |
diff --git a/keyboards/keychron/q5/config.h b/keyboards/keychron/q5/config.h index d459d8c54e..49216fba1f 100644 --- a/keyboards/keychron/q5/config.h +++ b/keyboards/keychron/q5/config.h | |||
| @@ -30,11 +30,11 @@ | |||
| 30 | #define DIODE_DIRECTION ROW2COL | 30 | #define DIODE_DIRECTION ROW2COL |
| 31 | 31 | ||
| 32 | /* RGB Matrix Driver Configuration */ | 32 | /* RGB Matrix Driver Configuration */ |
| 33 | #define CKLED2001_DRIVER_COUNT 2 | 33 | #define SNLED27351_DRIVER_COUNT 2 |
| 34 | #define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO | 34 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO |
| 35 | #define DRIVER_ADDR_2 CKLED2001_I2C_ADDRESS_GND | 35 | #define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_GND |
| 36 | 36 | ||
| 37 | #define CKLED2001_CURRENT_TUNE \ | 37 | #define SNLED27351_CURRENT_TUNE \ |
| 38 | { 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56 } | 38 | { 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56 } |
| 39 | 39 | ||
| 40 | /* DIP switch */ | 40 | /* DIP switch */ |
diff --git a/keyboards/keychron/q5/iso/info.json b/keyboards/keychron/q5/iso/info.json index 3b0b2ea1a0..2cc2ce9640 100644 --- a/keyboards/keychron/q5/iso/info.json +++ b/keyboards/keychron/q5/iso/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "processor": "STM32L432", | 14 | "processor": "STM32L432", |
| 15 | "bootloader": "stm32-dfu", | 15 | "bootloader": "stm32-dfu", |
diff --git a/keyboards/keychron/q5/iso/iso.c b/keyboards/keychron/q5/iso/iso.c index 65924abd76..8a7cb863ec 100644 --- a/keyboards/keychron/q5/iso/iso.c +++ b/keyboards/keychron/q5/iso/iso.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to IS31 manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/q5/iso_encoder/info.json b/keyboards/keychron/q5/iso_encoder/info.json index eefa6dc693..a425cf3145 100644 --- a/keyboards/keychron/q5/iso_encoder/info.json +++ b/keyboards/keychron/q5/iso_encoder/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "encoder": { | 14 | "encoder": { |
| 15 | "rotary": [ | 15 | "rotary": [ |
diff --git a/keyboards/keychron/q5/iso_encoder/iso_encoder.c b/keyboards/keychron/q5/iso_encoder/iso_encoder.c index 22ba9e2d4e..009e8043db 100644 --- a/keyboards/keychron/q5/iso_encoder/iso_encoder.c +++ b/keyboards/keychron/q5/iso_encoder/iso_encoder.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to IS31 manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/q6/ansi/ansi.c b/keyboards/keychron/q6/ansi/ansi.c index a81d5f9e9f..80eaad02b3 100644 --- a/keyboards/keychron/q6/ansi/ansi.c +++ b/keyboards/keychron/q6/ansi/ansi.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to IS31 manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/q6/ansi/info.json b/keyboards/keychron/q6/ansi/info.json index fdec220e80..108cc46379 100644 --- a/keyboards/keychron/q6/ansi/info.json +++ b/keyboards/keychron/q6/ansi/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "processor": "STM32L432", | 14 | "processor": "STM32L432", |
| 15 | "bootloader": "stm32-dfu", | 15 | "bootloader": "stm32-dfu", |
diff --git a/keyboards/keychron/q6/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q6/ansi_encoder/ansi_encoder.c index 6fbece3678..9c88533620 100644 --- a/keyboards/keychron/q6/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/q6/ansi_encoder/ansi_encoder.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to IS31 manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/q6/ansi_encoder/info.json b/keyboards/keychron/q6/ansi_encoder/info.json index df3902f44a..fc2da19f73 100644 --- a/keyboards/keychron/q6/ansi_encoder/info.json +++ b/keyboards/keychron/q6/ansi_encoder/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "encoder": { | 14 | "encoder": { |
| 15 | "rotary": [ | 15 | "rotary": [ |
diff --git a/keyboards/keychron/q6/config.h b/keyboards/keychron/q6/config.h index 98e3642c4d..8b26545724 100644 --- a/keyboards/keychron/q6/config.h +++ b/keyboards/keychron/q6/config.h | |||
| @@ -24,11 +24,11 @@ | |||
| 24 | #define DIODE_DIRECTION ROW2COL | 24 | #define DIODE_DIRECTION ROW2COL |
| 25 | 25 | ||
| 26 | /* RGB Matrix Driver Configuration */ | 26 | /* RGB Matrix Driver Configuration */ |
| 27 | #define CKLED2001_DRIVER_COUNT 2 | 27 | #define SNLED27351_DRIVER_COUNT 2 |
| 28 | #define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO | 28 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO |
| 29 | #define DRIVER_ADDR_2 CKLED2001_I2C_ADDRESS_GND | 29 | #define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_GND |
| 30 | 30 | ||
| 31 | #define CKLED2001_CURRENT_TUNE \ | 31 | #define SNLED27351_CURRENT_TUNE \ |
| 32 | { 0xA4, 0xA4, 0x52, 0xA4, 0xA4, 0x52, 0xA4, 0xA4, 0x52, 0xA4, 0xA4, 0x52 } | 32 | { 0xA4, 0xA4, 0x52, 0xA4, 0xA4, 0x52, 0xA4, 0xA4, 0x52, 0xA4, 0xA4, 0x52 } |
| 33 | 33 | ||
| 34 | /* DIP switch */ | 34 | /* DIP switch */ |
diff --git a/keyboards/keychron/q6/iso/info.json b/keyboards/keychron/q6/iso/info.json index dfaa20aa93..269605ff8b 100644 --- a/keyboards/keychron/q6/iso/info.json +++ b/keyboards/keychron/q6/iso/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "processor": "STM32L432", | 14 | "processor": "STM32L432", |
| 15 | "bootloader": "stm32-dfu", | 15 | "bootloader": "stm32-dfu", |
diff --git a/keyboards/keychron/q6/iso/iso.c b/keyboards/keychron/q6/iso/iso.c index f2081177e9..d2aa010c05 100644 --- a/keyboards/keychron/q6/iso/iso.c +++ b/keyboards/keychron/q6/iso/iso.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to IS31 manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/q6/iso_encoder/info.json b/keyboards/keychron/q6/iso_encoder/info.json index 4590616831..e5aa0bd8f5 100644 --- a/keyboards/keychron/q6/iso_encoder/info.json +++ b/keyboards/keychron/q6/iso_encoder/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "encoder": { | 14 | "encoder": { |
| 15 | "rotary": [ | 15 | "rotary": [ |
diff --git a/keyboards/keychron/q6/iso_encoder/iso_encoder.c b/keyboards/keychron/q6/iso_encoder/iso_encoder.c index e9a6f6edfc..66e066b839 100644 --- a/keyboards/keychron/q6/iso_encoder/iso_encoder.c +++ b/keyboards/keychron/q6/iso_encoder/iso_encoder.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to IS31 manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/q60/ansi/ansi.c b/keyboards/keychron/q60/ansi/ansi.c index bb3c84b64a..ac72737146 100644 --- a/keyboards/keychron/q60/ansi/ansi.c +++ b/keyboards/keychron/q60/ansi/ansi.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to CKLED manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/q60/ansi/info.json b/keyboards/keychron/q60/ansi/info.json index 95b1c4e472..f5832b2d8f 100644 --- a/keyboards/keychron/q60/ansi/info.json +++ b/keyboards/keychron/q60/ansi/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "matrix_pins": { | 14 | "matrix_pins": { |
| 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9"], | 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9"], |
diff --git a/keyboards/keychron/q60/config.h b/keyboards/keychron/q60/config.h index e5d0954ba0..9816ff3479 100644 --- a/keyboards/keychron/q60/config.h +++ b/keyboards/keychron/q60/config.h | |||
| @@ -17,8 +17,8 @@ | |||
| 17 | #pragma once | 17 | #pragma once |
| 18 | 18 | ||
| 19 | /* RGB Matrix Driver Configuration */ | 19 | /* RGB Matrix Driver Configuration */ |
| 20 | #define CKLED2001_DRIVER_COUNT 1 | 20 | #define SNLED27351_DRIVER_COUNT 1 |
| 21 | #define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_GND | 21 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_GND |
| 22 | 22 | ||
| 23 | /* Increase I2C speed to 1000 KHz */ | 23 | /* Increase I2C speed to 1000 KHz */ |
| 24 | #define I2C1_TIMINGR_PRESC 0U | 24 | #define I2C1_TIMINGR_PRESC 0U |
| @@ -27,7 +27,7 @@ | |||
| 27 | #define I2C1_TIMINGR_SCLH 15U | 27 | #define I2C1_TIMINGR_SCLH 15U |
| 28 | #define I2C1_TIMINGR_SCLL 51U | 28 | #define I2C1_TIMINGR_SCLL 51U |
| 29 | 29 | ||
| 30 | #define CKLED2001_CURRENT_TUNE \ | 30 | #define SNLED27351_CURRENT_TUNE \ |
| 31 | { 0xD8, 0xD8, 0x60, 0xD8, 0xD8, 0x60, 0xD8, 0xD8, 0x60, 0xD8, 0xD8, 0x60 } | 31 | { 0xD8, 0xD8, 0x60, 0xD8, 0xD8, 0x60, 0xD8, 0xD8, 0x60, 0xD8, 0xD8, 0x60 } |
| 32 | 32 | ||
| 33 | /* DIP switch */ | 33 | /* DIP switch */ |
diff --git a/keyboards/keychron/q65/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q65/ansi_encoder/ansi_encoder.c index fffa00194d..8e9b37b806 100644 --- a/keyboards/keychron/q65/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/q65/ansi_encoder/ansi_encoder.c | |||
| @@ -18,8 +18,8 @@ | |||
| 18 | 18 | ||
| 19 | #ifdef RGB_MATRIX_ENABLE | 19 | #ifdef RGB_MATRIX_ENABLE |
| 20 | 20 | ||
| 21 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 21 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 22 | /* Refer to CKLED manual for these locations | 22 | /* Refer to SNLED27351 manual for these locations |
| 23 | * driver | 23 | * driver |
| 24 | * | R location | 24 | * | R location |
| 25 | * | | G location | 25 | * | | G location |
diff --git a/keyboards/keychron/q65/ansi_encoder/info.json b/keyboards/keychron/q65/ansi_encoder/info.json index 0f7679945a..a42d7d289c 100644 --- a/keyboards/keychron/q65/ansi_encoder/info.json +++ b/keyboards/keychron/q65/ansi_encoder/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "encoder": { | 14 | "encoder": { |
| 15 | "rotary": [ | 15 | "rotary": [ |
diff --git a/keyboards/keychron/q65/config.h b/keyboards/keychron/q65/config.h index 35d05ffab7..43b7ef9b04 100644 --- a/keyboards/keychron/q65/config.h +++ b/keyboards/keychron/q65/config.h | |||
| @@ -26,9 +26,9 @@ | |||
| 26 | { NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, A2, A3, A4, A5, A6, A7, B0, B1 } | 26 | { NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, A2, A3, A4, A5, A6, A7, B0, B1 } |
| 27 | 27 | ||
| 28 | /* RGB Matrix Driver Configuration */ | 28 | /* RGB Matrix Driver Configuration */ |
| 29 | #define CKLED2001_DRIVER_COUNT 2 | 29 | #define SNLED27351_DRIVER_COUNT 2 |
| 30 | #define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO | 30 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO |
| 31 | #define DRIVER_ADDR_2 CKLED2001_I2C_ADDRESS_GND | 31 | #define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_GND |
| 32 | 32 | ||
| 33 | /* Increase I2C speed to 1000 KHz */ | 33 | /* Increase I2C speed to 1000 KHz */ |
| 34 | #define I2C1_TIMINGR_PRESC 0U | 34 | #define I2C1_TIMINGR_PRESC 0U |
| @@ -37,8 +37,8 @@ | |||
| 37 | #define I2C1_TIMINGR_SCLH 15U | 37 | #define I2C1_TIMINGR_SCLH 15U |
| 38 | #define I2C1_TIMINGR_SCLL 30U | 38 | #define I2C1_TIMINGR_SCLL 30U |
| 39 | 39 | ||
| 40 | #define CKLED2001_PHASE_CHANNEL CKLED2001_MSKPHASE_9CHANNEL | 40 | #define SNLED27351_PHASE_CHANNEL SNLED27351_MSKPHASE_9CHANNEL |
| 41 | #define CKLED2001_CURRENT_TUNE \ | 41 | #define SNLED27351_CURRENT_TUNE \ |
| 42 | { 0xB8, 0xB8, 0x58, 0xB8, 0xB8, 0x58, 0xB8, 0xB8, 0x58, 0xB8, 0xB8, 0x58 } | 42 | { 0xB8, 0xB8, 0x58, 0xB8, 0xB8, 0x58, 0xB8, 0xB8, 0x58, 0xB8, 0xB8, 0x58 } |
| 43 | 43 | ||
| 44 | /* Disable DIP switch in matrix data */ | 44 | /* Disable DIP switch in matrix data */ |
diff --git a/keyboards/keychron/q7/ansi/ansi.c b/keyboards/keychron/q7/ansi/ansi.c index 3dccb8b660..190c110a77 100644 --- a/keyboards/keychron/q7/ansi/ansi.c +++ b/keyboards/keychron/q7/ansi/ansi.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to CKLED manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/q7/ansi/info.json b/keyboards/keychron/q7/ansi/info.json index 2549e329f2..717fe357b7 100644 --- a/keyboards/keychron/q7/ansi/info.json +++ b/keyboards/keychron/q7/ansi/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "matrix_pins": { | 14 | "matrix_pins": { |
| 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "A10", "B5"], | 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "A10", "B5"], |
diff --git a/keyboards/keychron/q7/config.h b/keyboards/keychron/q7/config.h index 125e17a3da..9593196149 100644 --- a/keyboards/keychron/q7/config.h +++ b/keyboards/keychron/q7/config.h | |||
| @@ -17,9 +17,9 @@ | |||
| 17 | #pragma once | 17 | #pragma once |
| 18 | 18 | ||
| 19 | /* RGB Matrix Driver Configuration */ | 19 | /* RGB Matrix Driver Configuration */ |
| 20 | #define CKLED2001_DRIVER_COUNT 2 | 20 | #define SNLED27351_DRIVER_COUNT 2 |
| 21 | #define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO | 21 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO |
| 22 | #define DRIVER_ADDR_2 CKLED2001_I2C_ADDRESS_GND | 22 | #define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_GND |
| 23 | 23 | ||
| 24 | /* Increase I2C speed to 1000 KHz */ | 24 | /* Increase I2C speed to 1000 KHz */ |
| 25 | #define I2C1_TIMINGR_PRESC 0U | 25 | #define I2C1_TIMINGR_PRESC 0U |
| @@ -28,8 +28,8 @@ | |||
| 28 | #define I2C1_TIMINGR_SCLH 15U | 28 | #define I2C1_TIMINGR_SCLH 15U |
| 29 | #define I2C1_TIMINGR_SCLL 51U | 29 | #define I2C1_TIMINGR_SCLL 51U |
| 30 | 30 | ||
| 31 | #define CKLED2001_PHASE_CHANNEL CKLED2001_MSKPHASE_9CHANNEL | 31 | #define SNLED27351_PHASE_CHANNEL SNLED27351_MSKPHASE_9CHANNEL |
| 32 | #define CKLED2001_CURRENT_TUNE \ | 32 | #define SNLED27351_CURRENT_TUNE \ |
| 33 | { 0xF8, 0xF8, 0x80, 0xF8, 0xF8, 0x80, 0xF8, 0xF8, 0x80, 0xF8, 0xF8, 0x80 } | 33 | { 0xF8, 0xF8, 0x80, 0xF8, 0xF8, 0x80, 0xF8, 0xF8, 0x80, 0xF8, 0xF8, 0x80 } |
| 34 | 34 | ||
| 35 | /* DIP switch */ | 35 | /* DIP switch */ |
diff --git a/keyboards/keychron/q7/iso/info.json b/keyboards/keychron/q7/iso/info.json index 27262eb4f3..d57c5b17b9 100644 --- a/keyboards/keychron/q7/iso/info.json +++ b/keyboards/keychron/q7/iso/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "matrix_pins": { | 14 | "matrix_pins": { |
| 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "A10", "B5"], | 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "A10", "B5"], |
diff --git a/keyboards/keychron/q7/iso/iso.c b/keyboards/keychron/q7/iso/iso.c index 039bd13836..13354b9f0b 100644 --- a/keyboards/keychron/q7/iso/iso.c +++ b/keyboards/keychron/q7/iso/iso.c | |||
| @@ -18,8 +18,8 @@ | |||
| 18 | 18 | ||
| 19 | #ifdef RGB_MATRIX_ENABLE | 19 | #ifdef RGB_MATRIX_ENABLE |
| 20 | 20 | ||
| 21 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 21 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 22 | /* Refer to CKLED manual for these locations | 22 | /* Refer to SNLED27351 manual for these locations |
| 23 | * driver | 23 | * driver |
| 24 | * | R location | 24 | * | R location |
| 25 | * | | G location | 25 | * | | G location |
diff --git a/keyboards/keychron/q8/ansi/ansi.c b/keyboards/keychron/q8/ansi/ansi.c index e9c4edeb3e..3bb10b383d 100644 --- a/keyboards/keychron/q8/ansi/ansi.c +++ b/keyboards/keychron/q8/ansi/ansi.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to CKLED manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/q8/ansi/info.json b/keyboards/keychron/q8/ansi/info.json index 7ee5b6c21f..f733004270 100644 --- a/keyboards/keychron/q8/ansi/info.json +++ b/keyboards/keychron/q8/ansi/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "matrix_pins": { | 14 | "matrix_pins": { |
| 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], | 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], |
diff --git a/keyboards/keychron/q8/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q8/ansi_encoder/ansi_encoder.c index e9c4edeb3e..3bb10b383d 100644 --- a/keyboards/keychron/q8/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/q8/ansi_encoder/ansi_encoder.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to CKLED manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/q8/ansi_encoder/info.json b/keyboards/keychron/q8/ansi_encoder/info.json index a4c3ac77e1..ccf9453d53 100644 --- a/keyboards/keychron/q8/ansi_encoder/info.json +++ b/keyboards/keychron/q8/ansi_encoder/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "matrix_pins": { | 14 | "matrix_pins": { |
| 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], | 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], |
diff --git a/keyboards/keychron/q8/config.h b/keyboards/keychron/q8/config.h index 4b6d5f1614..7b23723f99 100644 --- a/keyboards/keychron/q8/config.h +++ b/keyboards/keychron/q8/config.h | |||
| @@ -20,9 +20,9 @@ | |||
| 20 | // #define MATRIX_UNSELECT_DRIVE_HIGH | 20 | // #define MATRIX_UNSELECT_DRIVE_HIGH |
| 21 | 21 | ||
| 22 | /* RGB Matrix Driver Configuration */ | 22 | /* RGB Matrix Driver Configuration */ |
| 23 | #define CKLED2001_DRIVER_COUNT 2 | 23 | #define SNLED27351_DRIVER_COUNT 2 |
| 24 | #define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO | 24 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO |
| 25 | #define DRIVER_ADDR_2 CKLED2001_I2C_ADDRESS_GND | 25 | #define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_GND |
| 26 | 26 | ||
| 27 | /* Increase I2C speed to 1000 KHz */ | 27 | /* Increase I2C speed to 1000 KHz */ |
| 28 | #define I2C1_TIMINGR_PRESC 0U | 28 | #define I2C1_TIMINGR_PRESC 0U |
| @@ -31,8 +31,8 @@ | |||
| 31 | #define I2C1_TIMINGR_SCLH 15U | 31 | #define I2C1_TIMINGR_SCLH 15U |
| 32 | #define I2C1_TIMINGR_SCLL 51U | 32 | #define I2C1_TIMINGR_SCLL 51U |
| 33 | 33 | ||
| 34 | #define CKLED2001_PHASE_CHANNEL CKLED2001_MSKPHASE_9CHANNEL | 34 | #define SNLED27351_PHASE_CHANNEL SNLED27351_MSKPHASE_9CHANNEL |
| 35 | #define CKLED2001_CURRENT_TUNE \ | 35 | #define SNLED27351_CURRENT_TUNE \ |
| 36 | { 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60 } | 36 | { 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60 } |
| 37 | 37 | ||
| 38 | /* DIP switch */ | 38 | /* DIP switch */ |
diff --git a/keyboards/keychron/q8/iso/info.json b/keyboards/keychron/q8/iso/info.json index 03a6cd1fdd..28d586984e 100644 --- a/keyboards/keychron/q8/iso/info.json +++ b/keyboards/keychron/q8/iso/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "matrix_pins": { | 14 | "matrix_pins": { |
| 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], | 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], |
diff --git a/keyboards/keychron/q8/iso/iso.c b/keyboards/keychron/q8/iso/iso.c index 205989383e..dbcefd76c0 100644 --- a/keyboards/keychron/q8/iso/iso.c +++ b/keyboards/keychron/q8/iso/iso.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to CKLED manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/q8/iso_encoder/info.json b/keyboards/keychron/q8/iso_encoder/info.json index eb9dc22503..0d96f3f193 100644 --- a/keyboards/keychron/q8/iso_encoder/info.json +++ b/keyboards/keychron/q8/iso_encoder/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "matrix_pins": { | 14 | "matrix_pins": { |
| 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], | 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], |
diff --git a/keyboards/keychron/q8/iso_encoder/iso_encoder.c b/keyboards/keychron/q8/iso_encoder/iso_encoder.c index 205989383e..dbcefd76c0 100644 --- a/keyboards/keychron/q8/iso_encoder/iso_encoder.c +++ b/keyboards/keychron/q8/iso_encoder/iso_encoder.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to CKLED manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/q9/ansi/ansi.c b/keyboards/keychron/q9/ansi/ansi.c index b98149a5f8..9178c8dcc7 100644 --- a/keyboards/keychron/q9/ansi/ansi.c +++ b/keyboards/keychron/q9/ansi/ansi.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to CKLED manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/q9/ansi/info.json b/keyboards/keychron/q9/ansi/info.json index 952d3158c8..ccb29a749b 100644 --- a/keyboards/keychron/q9/ansi/info.json +++ b/keyboards/keychron/q9/ansi/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "matrix_pins": { | 14 | "matrix_pins": { |
| 15 | "cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14"], | 15 | "cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14"], |
diff --git a/keyboards/keychron/q9/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q9/ansi_encoder/ansi_encoder.c index de0eda1c02..58d66e0473 100644 --- a/keyboards/keychron/q9/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/q9/ansi_encoder/ansi_encoder.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to CKLED manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/q9/ansi_encoder/info.json b/keyboards/keychron/q9/ansi_encoder/info.json index 4fd5352638..3826a1b768 100644 --- a/keyboards/keychron/q9/ansi_encoder/info.json +++ b/keyboards/keychron/q9/ansi_encoder/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "matrix_pins": { | 14 | "matrix_pins": { |
| 15 | "cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14"], | 15 | "cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14"], |
diff --git a/keyboards/keychron/q9/config.h b/keyboards/keychron/q9/config.h index de5795a5f6..e423d962e0 100644 --- a/keyboards/keychron/q9/config.h +++ b/keyboards/keychron/q9/config.h | |||
| @@ -23,8 +23,8 @@ | |||
| 23 | #define DIP_SWITCH_MATRIX_GRID { { 3, 4 } } | 23 | #define DIP_SWITCH_MATRIX_GRID { { 3, 4 } } |
| 24 | 24 | ||
| 25 | /* RGB Matrix Driver Configuration */ | 25 | /* RGB Matrix Driver Configuration */ |
| 26 | #define CKLED2001_DRIVER_COUNT 1 | 26 | #define SNLED27351_DRIVER_COUNT 1 |
| 27 | #define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_GND | 27 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_GND |
| 28 | 28 | ||
| 29 | /* Increase I2C speed to 1000 KHz */ | 29 | /* Increase I2C speed to 1000 KHz */ |
| 30 | #define I2C1_TIMINGR_PRESC 0U | 30 | #define I2C1_TIMINGR_PRESC 0U |
| @@ -33,7 +33,7 @@ | |||
| 33 | #define I2C1_TIMINGR_SCLH 15U | 33 | #define I2C1_TIMINGR_SCLH 15U |
| 34 | #define I2C1_TIMINGR_SCLL 51U | 34 | #define I2C1_TIMINGR_SCLL 51U |
| 35 | 35 | ||
| 36 | #define CKLED2001_CURRENT_TUNE \ | 36 | #define SNLED27351_CURRENT_TUNE \ |
| 37 | { 0xF8, 0xF8, 0x70, 0xF8, 0xF8, 0x70, 0xF8, 0xF8, 0x70, 0xF8, 0xF8, 0x70 } | 37 | { 0xF8, 0xF8, 0x70, 0xF8, 0xF8, 0x70, 0xF8, 0xF8, 0x70, 0xF8, 0xF8, 0x70 } |
| 38 | 38 | ||
| 39 | /* turn off effects when suspended */ | 39 | /* turn off effects when suspended */ |
diff --git a/keyboards/keychron/q9/iso/info.json b/keyboards/keychron/q9/iso/info.json index 3e9a7690c1..a9586d6d91 100644 --- a/keyboards/keychron/q9/iso/info.json +++ b/keyboards/keychron/q9/iso/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "matrix_pins": { | 14 | "matrix_pins": { |
| 15 | "cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14"], | 15 | "cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14"], |
diff --git a/keyboards/keychron/q9/iso/iso.c b/keyboards/keychron/q9/iso/iso.c index 0e258e8c63..1917b61f37 100644 --- a/keyboards/keychron/q9/iso/iso.c +++ b/keyboards/keychron/q9/iso/iso.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to CKLED manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/q9/iso_encoder/info.json b/keyboards/keychron/q9/iso_encoder/info.json index ecf944744d..1c74566da1 100644 --- a/keyboards/keychron/q9/iso_encoder/info.json +++ b/keyboards/keychron/q9/iso_encoder/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "matrix_pins": { | 14 | "matrix_pins": { |
| 15 | "cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14"], | 15 | "cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14"], |
diff --git a/keyboards/keychron/q9/iso_encoder/iso_encoder.c b/keyboards/keychron/q9/iso_encoder/iso_encoder.c index 0804f33671..3a161fe9d7 100644 --- a/keyboards/keychron/q9/iso_encoder/iso_encoder.c +++ b/keyboards/keychron/q9/iso_encoder/iso_encoder.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to CKLED manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/q9_plus/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q9_plus/ansi_encoder/ansi_encoder.c index c0b4b3a32d..d264334fa0 100755 --- a/keyboards/keychron/q9_plus/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/q9_plus/ansi_encoder/ansi_encoder.c | |||
| @@ -17,8 +17,8 @@ | |||
| 17 | #include "quantum.h" | 17 | #include "quantum.h" |
| 18 | 18 | ||
| 19 | #ifdef RGB_MATRIX_ENABLE | 19 | #ifdef RGB_MATRIX_ENABLE |
| 20 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 20 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 21 | /* Refer to CKLED2001 manual for these locations | 21 | /* Refer to SNLED27351 manual for these locations |
| 22 | * driver | 22 | * driver |
| 23 | * | R location | 23 | * | R location |
| 24 | * | | G location | 24 | * | | G location |
diff --git a/keyboards/keychron/q9_plus/config.h b/keyboards/keychron/q9_plus/config.h index a8cba07e90..8416de0d6a 100755 --- a/keyboards/keychron/q9_plus/config.h +++ b/keyboards/keychron/q9_plus/config.h | |||
| @@ -23,8 +23,8 @@ | |||
| 23 | #define DIP_SWITCH_MATRIX_GRID {{ 3, 4 }} | 23 | #define DIP_SWITCH_MATRIX_GRID {{ 3, 4 }} |
| 24 | 24 | ||
| 25 | /* RGB Matrix Driver Configuration */ | 25 | /* RGB Matrix Driver Configuration */ |
| 26 | #define DRIVER_COUNT 1 | 26 | #define SNLED27351_DRIVER_COUNT 1 |
| 27 | #define DRIVER_ADDR_1 0b1110100 | 27 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_GND |
| 28 | 28 | ||
| 29 | /* Increase I2C speed to 1000 KHz */ | 29 | /* Increase I2C speed to 1000 KHz */ |
| 30 | #define I2C1_TIMINGR_PRESC 0U | 30 | #define I2C1_TIMINGR_PRESC 0U |
| @@ -34,7 +34,7 @@ | |||
| 34 | #define I2C1_TIMINGR_SCLL 51U | 34 | #define I2C1_TIMINGR_SCLL 51U |
| 35 | 35 | ||
| 36 | /* Set LED driver current */ | 36 | /* Set LED driver current */ |
| 37 | #define CKLED2001_CURRENT_TUNE \ | 37 | #define SNLED27351_CURRENT_TUNE \ |
| 38 | { 0xF8, 0xF8, 0x70, 0xF8, 0xF8, 0x70, 0xF8, 0xF8, 0x70, 0xF8, 0xF8, 0x70 } | 38 | { 0xF8, 0xF8, 0x70, 0xF8, 0xF8, 0x70, 0xF8, 0xF8, 0x70, 0xF8, 0xF8, 0x70 } |
| 39 | 39 | ||
| 40 | /* turn off effects when suspended */ | 40 | /* turn off effects when suspended */ |
diff --git a/keyboards/keychron/q9_plus/info.json b/keyboards/keychron/q9_plus/info.json index c56650cb1d..9f8703de37 100755 --- a/keyboards/keychron/q9_plus/info.json +++ b/keyboards/keychron/q9_plus/info.json | |||
| @@ -96,7 +96,7 @@ | |||
| 96 | } | 96 | } |
| 97 | }, | 97 | }, |
| 98 | "rgb_matrix": { | 98 | "rgb_matrix": { |
| 99 | "driver": "ckled2001", | 99 | "driver": "snled27351", |
| 100 | "animations": { | 100 | "animations": { |
| 101 | "breathing": true, | 101 | "breathing": true, |
| 102 | "band_spiral_val": true, | 102 | "band_spiral_val": true, |
diff --git a/keyboards/keychron/s1/ansi/rgb/config.h b/keyboards/keychron/s1/ansi/rgb/config.h index 1f77559339..21569bd07c 100644 --- a/keyboards/keychron/s1/ansi/rgb/config.h +++ b/keyboards/keychron/s1/ansi/rgb/config.h | |||
| @@ -17,15 +17,15 @@ | |||
| 17 | #pragma once | 17 | #pragma once |
| 18 | 18 | ||
| 19 | /* RGB Matrix Driver Configuration */ | 19 | /* RGB Matrix Driver Configuration */ |
| 20 | #define CKLED2001_DRIVER_COUNT 2 | 20 | #define SNLED27351_DRIVER_COUNT 2 |
| 21 | #define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO | 21 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO |
| 22 | #define DRIVER_ADDR_2 CKLED2001_I2C_ADDRESS_GND | 22 | #define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_GND |
| 23 | #define DRIVER_1_LED_TOTAL 46 | 23 | #define DRIVER_1_LED_TOTAL 46 |
| 24 | #define DRIVER_2_LED_TOTAL 38 | 24 | #define DRIVER_2_LED_TOTAL 38 |
| 25 | #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) | 25 | #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) |
| 26 | 26 | ||
| 27 | #define CKLED2001_PHASE_CHANNEL CKLED2001_MSKPHASE_9CHANNEL | 27 | #define SNLED27351_PHASE_CHANNEL SNLED27351_MSKPHASE_9CHANNEL |
| 28 | #define CKLED2001_CURRENT_TUNE \ | 28 | #define SNLED27351_CURRENT_TUNE \ |
| 29 | { 0xA0, 0xA0, 0x48, 0xA0, 0xA0, 0x48, 0xA0, 0xA0, 0x48, 0xA0, 0xA0, 0x48 } | 29 | { 0xA0, 0xA0, 0x48, 0xA0, 0xA0, 0x48, 0xA0, 0xA0, 0x48, 0xA0, 0xA0, 0x48 } |
| 30 | 30 | ||
| 31 | /* Disable RGB lighting when PC is in suspend */ | 31 | /* Disable RGB lighting when PC is in suspend */ |
diff --git a/keyboards/keychron/s1/ansi/rgb/info.json b/keyboards/keychron/s1/ansi/rgb/info.json index 3bef5f343c..6b49cb18e0 100644 --- a/keyboards/keychron/s1/ansi/rgb/info.json +++ b/keyboards/keychron/s1/ansi/rgb/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "matrix_pins": { | 14 | "matrix_pins": { |
| 15 | "cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14"], | 15 | "cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14"], |
diff --git a/keyboards/keychron/s1/ansi/rgb/rgb.c b/keyboards/keychron/s1/ansi/rgb/rgb.c index a0a2d25f94..ca39b0c796 100644 --- a/keyboards/keychron/s1/ansi/rgb/rgb.c +++ b/keyboards/keychron/s1/ansi/rgb/rgb.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to CKLED2001 manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/s1/ansi/white/config.h b/keyboards/keychron/s1/ansi/white/config.h index 02eeb7fc81..0ee5470f69 100644 --- a/keyboards/keychron/s1/ansi/white/config.h +++ b/keyboards/keychron/s1/ansi/white/config.h | |||
| @@ -17,13 +17,13 @@ | |||
| 17 | #pragma once | 17 | #pragma once |
| 18 | 18 | ||
| 19 | /* LED Matrix Driver Configuration */ | 19 | /* LED Matrix Driver Configuration */ |
| 20 | #define CKLED2001_DRIVER_COUNT 1 | 20 | #define SNLED27351_DRIVER_COUNT 1 |
| 21 | #define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_GND | 21 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_GND |
| 22 | #define DRIVER_1_LED_TOTAL 84 | 22 | #define DRIVER_1_LED_TOTAL 84 |
| 23 | #define LED_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL | 23 | #define LED_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL |
| 24 | 24 | ||
| 25 | #define CKLED2001_PHASE_CHANNEL CKLED2001_MSKPHASE_6CHANNEL | 25 | #define SNLED27351_PHASE_CHANNEL SNLED27351_MSKPHASE_6CHANNEL |
| 26 | #define CKLED2001_CURRENT_TUNE \ | 26 | #define SNLED27351_CURRENT_TUNE \ |
| 27 | { 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80 } // 250mA | 27 | { 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80 } // 250mA |
| 28 | // { 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40 } // 127mA | 28 | // { 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40 } // 127mA |
| 29 | 29 | ||
diff --git a/keyboards/keychron/s1/ansi/white/info.json b/keyboards/keychron/s1/ansi/white/info.json index ff0a6b69cb..bcd64eea59 100644 --- a/keyboards/keychron/s1/ansi/white/info.json +++ b/keyboards/keychron/s1/ansi/white/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "led_matrix": { | 11 | "led_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "matrix_pins": { | 14 | "matrix_pins": { |
| 15 | "cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14"], | 15 | "cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14"], |
diff --git a/keyboards/keychron/s1/ansi/white/white.c b/keyboards/keychron/s1/ansi/white/white.c index e41ba06401..b3a49ae9eb 100644 --- a/keyboards/keychron/s1/ansi/white/white.c +++ b/keyboards/keychron/s1/ansi/white/white.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[LED_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[LED_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to CKLED2001 manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | LED address | 26 | * | LED address |
| 27 | * | | */ | 27 | * | | */ |
diff --git a/keyboards/keychron/v1/ansi/ansi.c b/keyboards/keychron/v1/ansi/ansi.c index dc488d1b73..ed8a6ed1af 100644 --- a/keyboards/keychron/v1/ansi/ansi.c +++ b/keyboards/keychron/v1/ansi/ansi.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to IS31 manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/v1/ansi/config.h b/keyboards/keychron/v1/ansi/config.h index 143042076d..5d10cae886 100644 --- a/keyboards/keychron/v1/ansi/config.h +++ b/keyboards/keychron/v1/ansi/config.h | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | #define DRIVER_2_LED_TOTAL 37 | 21 | #define DRIVER_2_LED_TOTAL 37 |
| 22 | #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) | 22 | #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) |
| 23 | 23 | ||
| 24 | #define CKLED2001_CURRENT_TUNE \ | 24 | #define SNLED27351_CURRENT_TUNE \ |
| 25 | { 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50 } | 25 | { 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50 } |
| 26 | 26 | ||
| 27 | /* Enable caps-lock LED */ | 27 | /* Enable caps-lock LED */ |
diff --git a/keyboards/keychron/v1/ansi/info.json b/keyboards/keychron/v1/ansi/info.json index f4c526bfdc..34fdd6ac31 100644 --- a/keyboards/keychron/v1/ansi/info.json +++ b/keyboards/keychron/v1/ansi/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "processor": "STM32L432", | 14 | "processor": "STM32L432", |
| 15 | "bootloader": "stm32-dfu", | 15 | "bootloader": "stm32-dfu", |
diff --git a/keyboards/keychron/v1/ansi_encoder/ansi_encoder.c b/keyboards/keychron/v1/ansi_encoder/ansi_encoder.c index dc488d1b73..ed8a6ed1af 100644 --- a/keyboards/keychron/v1/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/v1/ansi_encoder/ansi_encoder.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to IS31 manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/v1/ansi_encoder/config.h b/keyboards/keychron/v1/ansi_encoder/config.h index c32e4d104a..ea0733eeaf 100644 --- a/keyboards/keychron/v1/ansi_encoder/config.h +++ b/keyboards/keychron/v1/ansi_encoder/config.h | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | #define DRIVER_2_LED_TOTAL 37 | 21 | #define DRIVER_2_LED_TOTAL 37 |
| 22 | #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) | 22 | #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) |
| 23 | 23 | ||
| 24 | #define CKLED2001_CURRENT_TUNE \ | 24 | #define SNLED27351_CURRENT_TUNE \ |
| 25 | { 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50 } | 25 | { 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50 } |
| 26 | 26 | ||
| 27 | /* Encoder Configuration */ | 27 | /* Encoder Configuration */ |
diff --git a/keyboards/keychron/v1/ansi_encoder/info.json b/keyboards/keychron/v1/ansi_encoder/info.json index 9beffb9f6a..43e07609ae 100644 --- a/keyboards/keychron/v1/ansi_encoder/info.json +++ b/keyboards/keychron/v1/ansi_encoder/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "encoder": { | 14 | "encoder": { |
| 15 | "rotary": [ | 15 | "rotary": [ |
diff --git a/keyboards/keychron/v1/config.h b/keyboards/keychron/v1/config.h index 8edbf05ca8..e08a27f1c3 100644 --- a/keyboards/keychron/v1/config.h +++ b/keyboards/keychron/v1/config.h | |||
| @@ -32,9 +32,9 @@ | |||
| 32 | #define DIP_SWITCH_MATRIX_GRID { {5,4} } | 32 | #define DIP_SWITCH_MATRIX_GRID { {5,4} } |
| 33 | 33 | ||
| 34 | /* RGB Matrix Driver Configuration */ | 34 | /* RGB Matrix Driver Configuration */ |
| 35 | #define CKLED2001_DRIVER_COUNT 2 | 35 | #define SNLED27351_DRIVER_COUNT 2 |
| 36 | #define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO | 36 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO |
| 37 | #define DRIVER_ADDR_2 CKLED2001_I2C_ADDRESS_GND | 37 | #define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_GND |
| 38 | 38 | ||
| 39 | /* Increase I2C speed to 1000 KHz */ | 39 | /* Increase I2C speed to 1000 KHz */ |
| 40 | #define I2C1_TIMINGR_PRESC 0U | 40 | #define I2C1_TIMINGR_PRESC 0U |
| @@ -43,7 +43,7 @@ | |||
| 43 | #define I2C1_TIMINGR_SCLH 15U | 43 | #define I2C1_TIMINGR_SCLH 15U |
| 44 | #define I2C1_TIMINGR_SCLL 51U | 44 | #define I2C1_TIMINGR_SCLL 51U |
| 45 | 45 | ||
| 46 | #define CKLED2001_PHASE_CHANNEL CKLED2001_MSKPHASE_9CHANNEL | 46 | #define SNLED27351_PHASE_CHANNEL SNLED27351_MSKPHASE_9CHANNEL |
| 47 | 47 | ||
| 48 | /* turn off effects when suspended */ | 48 | /* turn off effects when suspended */ |
| 49 | #define RGB_DISABLE_WHEN_USB_SUSPENDED | 49 | #define RGB_DISABLE_WHEN_USB_SUSPENDED |
diff --git a/keyboards/keychron/v1/iso/config.h b/keyboards/keychron/v1/iso/config.h index 13ebd695f3..acb35ac7ac 100644 --- a/keyboards/keychron/v1/iso/config.h +++ b/keyboards/keychron/v1/iso/config.h | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | #define DRIVER_2_LED_TOTAL 38 | 21 | #define DRIVER_2_LED_TOTAL 38 |
| 22 | #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) | 22 | #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) |
| 23 | 23 | ||
| 24 | #define CKLED2001_CURRENT_TUNE \ | 24 | #define SNLED27351_CURRENT_TUNE \ |
| 25 | { 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50 } | 25 | { 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50 } |
| 26 | 26 | ||
| 27 | /* Enable caps-lock LED */ | 27 | /* Enable caps-lock LED */ |
diff --git a/keyboards/keychron/v1/iso/info.json b/keyboards/keychron/v1/iso/info.json index 5a4c74234c..6dbf50a931 100644 --- a/keyboards/keychron/v1/iso/info.json +++ b/keyboards/keychron/v1/iso/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "processor": "STM32L432", | 14 | "processor": "STM32L432", |
| 15 | "bootloader": "stm32-dfu", | 15 | "bootloader": "stm32-dfu", |
diff --git a/keyboards/keychron/v1/iso/iso.c b/keyboards/keychron/v1/iso/iso.c index 1d9ef76997..00909c85e3 100644 --- a/keyboards/keychron/v1/iso/iso.c +++ b/keyboards/keychron/v1/iso/iso.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to IS31 manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/v1/iso_encoder/config.h b/keyboards/keychron/v1/iso_encoder/config.h index fd231aa98a..1a928cd9b7 100644 --- a/keyboards/keychron/v1/iso_encoder/config.h +++ b/keyboards/keychron/v1/iso_encoder/config.h | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | #define DRIVER_2_LED_TOTAL 38 | 21 | #define DRIVER_2_LED_TOTAL 38 |
| 22 | #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) | 22 | #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) |
| 23 | 23 | ||
| 24 | #define CKLED2001_CURRENT_TUNE \ | 24 | #define SNLED27351_CURRENT_TUNE \ |
| 25 | { 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50 } | 25 | { 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50 } |
| 26 | 26 | ||
| 27 | /* Encoder Configuration */ | 27 | /* Encoder Configuration */ |
diff --git a/keyboards/keychron/v1/iso_encoder/info.json b/keyboards/keychron/v1/iso_encoder/info.json index 106b43b5e7..1f009ac0c7 100644 --- a/keyboards/keychron/v1/iso_encoder/info.json +++ b/keyboards/keychron/v1/iso_encoder/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "encoder": { | 14 | "encoder": { |
| 15 | "rotary": [ | 15 | "rotary": [ |
diff --git a/keyboards/keychron/v1/iso_encoder/iso_encoder.c b/keyboards/keychron/v1/iso_encoder/iso_encoder.c index 1d9ef76997..00909c85e3 100644 --- a/keyboards/keychron/v1/iso_encoder/iso_encoder.c +++ b/keyboards/keychron/v1/iso_encoder/iso_encoder.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to IS31 manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/v1/jis/config.h b/keyboards/keychron/v1/jis/config.h index 474a84c8b9..ef778528fe 100644 --- a/keyboards/keychron/v1/jis/config.h +++ b/keyboards/keychron/v1/jis/config.h | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | #define DRIVER_2_LED_TOTAL 40 | 21 | #define DRIVER_2_LED_TOTAL 40 |
| 22 | #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) | 22 | #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) |
| 23 | 23 | ||
| 24 | #define CKLED2001_CURRENT_TUNE \ | 24 | #define SNLED27351_CURRENT_TUNE \ |
| 25 | { 0xA0, 0xA0, 0x4D, 0xA0, 0xA0, 0x4D, 0xA0, 0xA0, 0x4D, 0xA0, 0xA0, 0x4D } | 25 | { 0xA0, 0xA0, 0x4D, 0xA0, 0xA0, 0x4D, 0xA0, 0xA0, 0x4D, 0xA0, 0xA0, 0x4D } |
| 26 | 26 | ||
| 27 | /* Enable caps-lock LED */ | 27 | /* Enable caps-lock LED */ |
diff --git a/keyboards/keychron/v1/jis/info.json b/keyboards/keychron/v1/jis/info.json index 16365ccd9e..28425b5b50 100644 --- a/keyboards/keychron/v1/jis/info.json +++ b/keyboards/keychron/v1/jis/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "processor": "STM32L432", | 14 | "processor": "STM32L432", |
| 15 | "bootloader": "stm32-dfu", | 15 | "bootloader": "stm32-dfu", |
diff --git a/keyboards/keychron/v1/jis/jis.c b/keyboards/keychron/v1/jis/jis.c index 7f2f02bfa5..6bc647656d 100644 --- a/keyboards/keychron/v1/jis/jis.c +++ b/keyboards/keychron/v1/jis/jis.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to IS31 manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/v1/jis_encoder/config.h b/keyboards/keychron/v1/jis_encoder/config.h index 93d2a72d98..25db44a84c 100644 --- a/keyboards/keychron/v1/jis_encoder/config.h +++ b/keyboards/keychron/v1/jis_encoder/config.h | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | #define DRIVER_2_LED_TOTAL 40 | 21 | #define DRIVER_2_LED_TOTAL 40 |
| 22 | #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) | 22 | #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) |
| 23 | 23 | ||
| 24 | #define CKLED2001_CURRENT_TUNE \ | 24 | #define SNLED27351_CURRENT_TUNE \ |
| 25 | { 0xA0, 0xA0, 0x4D, 0xA0, 0xA0, 0x4D, 0xA0, 0xA0, 0x4D, 0xA0, 0xA0, 0x4D } | 25 | { 0xA0, 0xA0, 0x4D, 0xA0, 0xA0, 0x4D, 0xA0, 0xA0, 0x4D, 0xA0, 0xA0, 0x4D } |
| 26 | 26 | ||
| 27 | /* Encoder Configuration */ | 27 | /* Encoder Configuration */ |
diff --git a/keyboards/keychron/v1/jis_encoder/info.json b/keyboards/keychron/v1/jis_encoder/info.json index 702e579758..018f154537 100644 --- a/keyboards/keychron/v1/jis_encoder/info.json +++ b/keyboards/keychron/v1/jis_encoder/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "encoder": { | 14 | "encoder": { |
| 15 | "rotary": [ | 15 | "rotary": [ |
diff --git a/keyboards/keychron/v1/jis_encoder/jis_encoder.c b/keyboards/keychron/v1/jis_encoder/jis_encoder.c index 7f2f02bfa5..6bc647656d 100644 --- a/keyboards/keychron/v1/jis_encoder/jis_encoder.c +++ b/keyboards/keychron/v1/jis_encoder/jis_encoder.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to IS31 manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/v10/ansi_encoder/ansi_encoder.c b/keyboards/keychron/v10/ansi_encoder/ansi_encoder.c index bada8af6e9..8b787aad18 100644 --- a/keyboards/keychron/v10/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/v10/ansi_encoder/ansi_encoder.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to IS31 manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/v10/ansi_encoder/info.json b/keyboards/keychron/v10/ansi_encoder/info.json index 2a7dc307cb..a416601d02 100644 --- a/keyboards/keychron/v10/ansi_encoder/info.json +++ b/keyboards/keychron/v10/ansi_encoder/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "encoder": { | 14 | "encoder": { |
| 15 | "rotary": [ | 15 | "rotary": [ |
diff --git a/keyboards/keychron/v10/config.h b/keyboards/keychron/v10/config.h index b8aa40a186..e711b753dd 100644 --- a/keyboards/keychron/v10/config.h +++ b/keyboards/keychron/v10/config.h | |||
| @@ -31,9 +31,9 @@ | |||
| 31 | #define DIODE_DIRECTION ROW2COL | 31 | #define DIODE_DIRECTION ROW2COL |
| 32 | 32 | ||
| 33 | /* RGB Matrix Driver Configuration */ | 33 | /* RGB Matrix Driver Configuration */ |
| 34 | #define CKLED2001_DRIVER_COUNT 2 | 34 | #define SNLED27351_DRIVER_COUNT 2 |
| 35 | #define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO | 35 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO |
| 36 | #define DRIVER_ADDR_2 CKLED2001_I2C_ADDRESS_GND | 36 | #define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_GND |
| 37 | 37 | ||
| 38 | /* Increase I2C speed to 1000 KHz */ | 38 | /* Increase I2C speed to 1000 KHz */ |
| 39 | #define I2C1_TIMINGR_PRESC 0U | 39 | #define I2C1_TIMINGR_PRESC 0U |
| @@ -42,8 +42,8 @@ | |||
| 42 | #define I2C1_TIMINGR_SCLH 15U | 42 | #define I2C1_TIMINGR_SCLH 15U |
| 43 | #define I2C1_TIMINGR_SCLL 51U | 43 | #define I2C1_TIMINGR_SCLL 51U |
| 44 | 44 | ||
| 45 | #define CKLED2001_PHASE_CHANNEL CKLED2001_MSKPHASE_9CHANNEL | 45 | #define SNLED27351_PHASE_CHANNEL SNLED27351_MSKPHASE_9CHANNEL |
| 46 | #define CKLED2001_CURRENT_TUNE { 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A } | 46 | #define SNLED27351_CURRENT_TUNE { 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A } |
| 47 | 47 | ||
| 48 | /* DIP switch */ | 48 | /* DIP switch */ |
| 49 | #define DIP_SWITCH_MATRIX_GRID { {5,5} } | 49 | #define DIP_SWITCH_MATRIX_GRID { {5,5} } |
diff --git a/keyboards/keychron/v10/iso_encoder/info.json b/keyboards/keychron/v10/iso_encoder/info.json index 455b375472..4c6b6580e0 100644 --- a/keyboards/keychron/v10/iso_encoder/info.json +++ b/keyboards/keychron/v10/iso_encoder/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "encoder": { | 14 | "encoder": { |
| 15 | "rotary": [ | 15 | "rotary": [ |
diff --git a/keyboards/keychron/v10/iso_encoder/iso_encoder.c b/keyboards/keychron/v10/iso_encoder/iso_encoder.c index 070a01a8a8..f7e0a10470 100644 --- a/keyboards/keychron/v10/iso_encoder/iso_encoder.c +++ b/keyboards/keychron/v10/iso_encoder/iso_encoder.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to IS31 manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/v2/ansi/ansi.c b/keyboards/keychron/v2/ansi/ansi.c index a2524d36cc..d98a96fdf9 100644 --- a/keyboards/keychron/v2/ansi/ansi.c +++ b/keyboards/keychron/v2/ansi/ansi.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to CKLED manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/v2/ansi/config.h b/keyboards/keychron/v2/ansi/config.h index b6c31201a7..094038d5b3 100644 --- a/keyboards/keychron/v2/ansi/config.h +++ b/keyboards/keychron/v2/ansi/config.h | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | #define DRIVER_2_LED_TOTAL 33 | 21 | #define DRIVER_2_LED_TOTAL 33 |
| 22 | #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) | 22 | #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) |
| 23 | 23 | ||
| 24 | #define CKLED2001_CURRENT_TUNE \ | 24 | #define SNLED27351_CURRENT_TUNE \ |
| 25 | { 0xCA, 0xCA, 0x60, 0xCA, 0xCA, 0x60, 0xCA, 0xCA, 0x60, 0xCA, 0xCA, 0x60 } | 25 | { 0xCA, 0xCA, 0x60, 0xCA, 0xCA, 0x60, 0xCA, 0xCA, 0x60, 0xCA, 0xCA, 0x60 } |
| 26 | 26 | ||
| 27 | /* Enable caps-lock LED */ | 27 | /* Enable caps-lock LED */ |
diff --git a/keyboards/keychron/v2/ansi/info.json b/keyboards/keychron/v2/ansi/info.json index d07fba97b8..3b54b90201 100644 --- a/keyboards/keychron/v2/ansi/info.json +++ b/keyboards/keychron/v2/ansi/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "matrix_pins": { | 14 | "matrix_pins": { |
| 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], | 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], |
diff --git a/keyboards/keychron/v2/ansi_encoder/ansi_encoder.c b/keyboards/keychron/v2/ansi_encoder/ansi_encoder.c index 2c9fe0e8e2..64153d4251 100644 --- a/keyboards/keychron/v2/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/v2/ansi_encoder/ansi_encoder.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to CKLED manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/v2/ansi_encoder/info.json b/keyboards/keychron/v2/ansi_encoder/info.json index c733b389e6..f1998272e9 100644 --- a/keyboards/keychron/v2/ansi_encoder/info.json +++ b/keyboards/keychron/v2/ansi_encoder/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "matrix_pins": { | 14 | "matrix_pins": { |
| 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], | 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], |
diff --git a/keyboards/keychron/v2/config.h b/keyboards/keychron/v2/config.h index 8e881da987..8ac0bea5f0 100644 --- a/keyboards/keychron/v2/config.h +++ b/keyboards/keychron/v2/config.h | |||
| @@ -20,9 +20,9 @@ | |||
| 20 | // #define MATRIX_UNSELECT_DRIVE_HIGH | 20 | // #define MATRIX_UNSELECT_DRIVE_HIGH |
| 21 | 21 | ||
| 22 | /* RGB Matrix Driver Configuration */ | 22 | /* RGB Matrix Driver Configuration */ |
| 23 | #define CKLED2001_DRIVER_COUNT 2 | 23 | #define SNLED27351_DRIVER_COUNT 2 |
| 24 | #define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO | 24 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO |
| 25 | #define DRIVER_ADDR_2 CKLED2001_I2C_ADDRESS_GND | 25 | #define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_GND |
| 26 | 26 | ||
| 27 | /* Increase I2C speed to 1000 KHz */ | 27 | /* Increase I2C speed to 1000 KHz */ |
| 28 | #define I2C1_TIMINGR_PRESC 0U | 28 | #define I2C1_TIMINGR_PRESC 0U |
| @@ -31,7 +31,7 @@ | |||
| 31 | #define I2C1_TIMINGR_SCLH 15U | 31 | #define I2C1_TIMINGR_SCLH 15U |
| 32 | #define I2C1_TIMINGR_SCLL 51U | 32 | #define I2C1_TIMINGR_SCLL 51U |
| 33 | 33 | ||
| 34 | #define CKLED2001_PHASE_CHANNEL CKLED2001_MSKPHASE_9CHANNEL | 34 | #define SNLED27351_PHASE_CHANNEL SNLED27351_MSKPHASE_9CHANNEL |
| 35 | 35 | ||
| 36 | /* Disable DIP switch in matrix data */ | 36 | /* Disable DIP switch in matrix data */ |
| 37 | #define MATRIX_MASKED | 37 | #define MATRIX_MASKED |
diff --git a/keyboards/keychron/v2/iso/info.json b/keyboards/keychron/v2/iso/info.json index 0d8376f7b7..cfc5ef3c5b 100644 --- a/keyboards/keychron/v2/iso/info.json +++ b/keyboards/keychron/v2/iso/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "matrix_pins": { | 14 | "matrix_pins": { |
| 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], | 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], |
diff --git a/keyboards/keychron/v2/iso/iso.c b/keyboards/keychron/v2/iso/iso.c index 385f566252..37cac7337d 100644 --- a/keyboards/keychron/v2/iso/iso.c +++ b/keyboards/keychron/v2/iso/iso.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to IS31 manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/v2/iso_encoder/info.json b/keyboards/keychron/v2/iso_encoder/info.json index 0241cdb21e..d5f630a3c3 100644 --- a/keyboards/keychron/v2/iso_encoder/info.json +++ b/keyboards/keychron/v2/iso_encoder/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "matrix_pins": { | 14 | "matrix_pins": { |
| 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], | 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], |
diff --git a/keyboards/keychron/v2/iso_encoder/iso_encoder.c b/keyboards/keychron/v2/iso_encoder/iso_encoder.c index 385f566252..37cac7337d 100644 --- a/keyboards/keychron/v2/iso_encoder/iso_encoder.c +++ b/keyboards/keychron/v2/iso_encoder/iso_encoder.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to IS31 manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/v2/jis/config.h b/keyboards/keychron/v2/jis/config.h index f258f9edd1..1b3fd5a27a 100644 --- a/keyboards/keychron/v2/jis/config.h +++ b/keyboards/keychron/v2/jis/config.h | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | #define DRIVER_2_LED_TOTAL 36 | 21 | #define DRIVER_2_LED_TOTAL 36 |
| 22 | #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) | 22 | #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) |
| 23 | 23 | ||
| 24 | #define CKLED2001_CURRENT_TUNE \ | 24 | #define SNLED27351_CURRENT_TUNE \ |
| 25 | { 0xBD, 0xBD, 0x5D, 0xBD, 0xBD, 0x5D, 0xBD, 0xBD, 0x5D, 0xBD, 0xBD, 0x5D } | 25 | { 0xBD, 0xBD, 0x5D, 0xBD, 0xBD, 0x5D, 0xBD, 0xBD, 0x5D, 0xBD, 0xBD, 0x5D } |
| 26 | 26 | ||
| 27 | /* Enable caps-lock LED */ | 27 | /* Enable caps-lock LED */ |
diff --git a/keyboards/keychron/v2/jis/info.json b/keyboards/keychron/v2/jis/info.json index f65e2b51d2..124cb0ecc6 100644 --- a/keyboards/keychron/v2/jis/info.json +++ b/keyboards/keychron/v2/jis/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "matrix_pins": { | 14 | "matrix_pins": { |
| 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], | 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], |
diff --git a/keyboards/keychron/v2/jis/jis.c b/keyboards/keychron/v2/jis/jis.c index b9060cafb2..42285e56ca 100644 --- a/keyboards/keychron/v2/jis/jis.c +++ b/keyboards/keychron/v2/jis/jis.c | |||
| @@ -18,8 +18,8 @@ | |||
| 18 | 18 | ||
| 19 | #ifdef RGB_MATRIX_ENABLE | 19 | #ifdef RGB_MATRIX_ENABLE |
| 20 | 20 | ||
| 21 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 21 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 22 | /* Refer to IS31 manual for these locations | 22 | /* Refer to SNLED27351 manual for these locations |
| 23 | * driver | 23 | * driver |
| 24 | * | R location | 24 | * | R location |
| 25 | * | | G location | 25 | * | | G location |
diff --git a/keyboards/keychron/v2/jis_encoder/config.h b/keyboards/keychron/v2/jis_encoder/config.h index a9a3438ab7..aacac818a4 100644 --- a/keyboards/keychron/v2/jis_encoder/config.h +++ b/keyboards/keychron/v2/jis_encoder/config.h | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | #define DRIVER_2_LED_TOTAL 36 | 21 | #define DRIVER_2_LED_TOTAL 36 |
| 22 | #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) | 22 | #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) |
| 23 | 23 | ||
| 24 | #define CKLED2001_CURRENT_TUNE \ | 24 | #define SNLED27351_CURRENT_TUNE \ |
| 25 | { 0xBD, 0xBD, 0x5D, 0xBD, 0xBD, 0x5D, 0xBD, 0xBD, 0x5D, 0xBD, 0xBD, 0x5D } | 25 | { 0xBD, 0xBD, 0x5D, 0xBD, 0xBD, 0x5D, 0xBD, 0xBD, 0x5D, 0xBD, 0xBD, 0x5D } |
| 26 | 26 | ||
| 27 | /* Encoder Configuration */ | 27 | /* Encoder Configuration */ |
diff --git a/keyboards/keychron/v2/jis_encoder/info.json b/keyboards/keychron/v2/jis_encoder/info.json index 263e403167..d3df93819f 100644 --- a/keyboards/keychron/v2/jis_encoder/info.json +++ b/keyboards/keychron/v2/jis_encoder/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "matrix_pins": { | 14 | "matrix_pins": { |
| 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], | 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], |
diff --git a/keyboards/keychron/v2/jis_encoder/jis_encoder.c b/keyboards/keychron/v2/jis_encoder/jis_encoder.c index 661ee0c1d6..5ccbb807cb 100644 --- a/keyboards/keychron/v2/jis_encoder/jis_encoder.c +++ b/keyboards/keychron/v2/jis_encoder/jis_encoder.c | |||
| @@ -18,8 +18,8 @@ | |||
| 18 | 18 | ||
| 19 | #ifdef RGB_MATRIX_ENABLE | 19 | #ifdef RGB_MATRIX_ENABLE |
| 20 | 20 | ||
| 21 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 21 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 22 | /* Refer to IS31 manual for these locations | 22 | /* Refer to SNLED27351 manual for these locations |
| 23 | * driver | 23 | * driver |
| 24 | * | R location | 24 | * | R location |
| 25 | * | | G location | 25 | * | | G location |
diff --git a/keyboards/keychron/v3/ansi/ansi.c b/keyboards/keychron/v3/ansi/ansi.c index 6d56122c52..16d6b77131 100644 --- a/keyboards/keychron/v3/ansi/ansi.c +++ b/keyboards/keychron/v3/ansi/ansi.c | |||
| @@ -18,8 +18,8 @@ | |||
| 18 | 18 | ||
| 19 | #ifdef RGB_MATRIX_ENABLE | 19 | #ifdef RGB_MATRIX_ENABLE |
| 20 | 20 | ||
| 21 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 21 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 22 | /* Refer to IS31 manual for these locations | 22 | /* Refer to SNLED27351 manual for these locations |
| 23 | * driver | 23 | * driver |
| 24 | * | R location | 24 | * | R location |
| 25 | * | | G location | 25 | * | | G location |
diff --git a/keyboards/keychron/v3/ansi/config.h b/keyboards/keychron/v3/ansi/config.h index ff756dc046..ba64aa96da 100644 --- a/keyboards/keychron/v3/ansi/config.h +++ b/keyboards/keychron/v3/ansi/config.h | |||
| @@ -30,7 +30,7 @@ | |||
| 30 | #define DRIVER_2_LED_TOTAL 39 | 30 | #define DRIVER_2_LED_TOTAL 39 |
| 31 | #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) | 31 | #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) |
| 32 | 32 | ||
| 33 | #define CKLED2001_CURRENT_TUNE \ | 33 | #define SNLED27351_CURRENT_TUNE \ |
| 34 | { 0x95, 0x95, 0x55, 0x95, 0x95, 0x55, 0x95, 0x95, 0x55, 0x95, 0x95, 0x55 } | 34 | { 0x95, 0x95, 0x55, 0x95, 0x95, 0x55, 0x95, 0x95, 0x55, 0x95, 0x95, 0x55 } |
| 35 | 35 | ||
| 36 | /* Enable CapsLcok LED */ | 36 | /* Enable CapsLcok LED */ |
diff --git a/keyboards/keychron/v3/ansi/info.json b/keyboards/keychron/v3/ansi/info.json index 6572066329..49792690a7 100644 --- a/keyboards/keychron/v3/ansi/info.json +++ b/keyboards/keychron/v3/ansi/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "processor": "STM32L432", | 14 | "processor": "STM32L432", |
| 15 | "bootloader": "stm32-dfu", | 15 | "bootloader": "stm32-dfu", |
diff --git a/keyboards/keychron/v3/ansi_encoder/ansi_encoder.c b/keyboards/keychron/v3/ansi_encoder/ansi_encoder.c index 5ed38074e3..39fa354539 100644 --- a/keyboards/keychron/v3/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/v3/ansi_encoder/ansi_encoder.c | |||
| @@ -18,8 +18,8 @@ | |||
| 18 | 18 | ||
| 19 | #ifdef RGB_MATRIX_ENABLE | 19 | #ifdef RGB_MATRIX_ENABLE |
| 20 | 20 | ||
| 21 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 21 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 22 | /* Refer to IS31 manual for these locations | 22 | /* Refer to SNLED27351 manual for these locations |
| 23 | * driver | 23 | * driver |
| 24 | * | R location | 24 | * | R location |
| 25 | * | | G location | 25 | * | | G location |
diff --git a/keyboards/keychron/v3/ansi_encoder/info.json b/keyboards/keychron/v3/ansi_encoder/info.json index cffbc85158..ad46ae7a62 100644 --- a/keyboards/keychron/v3/ansi_encoder/info.json +++ b/keyboards/keychron/v3/ansi_encoder/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "encoder": { | 14 | "encoder": { |
| 15 | "rotary": [ | 15 | "rotary": [ |
diff --git a/keyboards/keychron/v3/config.h b/keyboards/keychron/v3/config.h index 8757f6bace..a6a6394ffd 100644 --- a/keyboards/keychron/v3/config.h +++ b/keyboards/keychron/v3/config.h | |||
| @@ -20,9 +20,9 @@ | |||
| 20 | #define DIODE_DIRECTION ROW2COL | 20 | #define DIODE_DIRECTION ROW2COL |
| 21 | 21 | ||
| 22 | /* RGB Matrix Driver Configuration */ | 22 | /* RGB Matrix Driver Configuration */ |
| 23 | #define CKLED2001_DRIVER_COUNT 2 | 23 | #define SNLED27351_DRIVER_COUNT 2 |
| 24 | #define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO | 24 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO |
| 25 | #define DRIVER_ADDR_2 CKLED2001_I2C_ADDRESS_GND | 25 | #define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_GND |
| 26 | 26 | ||
| 27 | /* Increase I2C speed to 1000 KHz */ | 27 | /* Increase I2C speed to 1000 KHz */ |
| 28 | #define I2C1_TIMINGR_PRESC 0U | 28 | #define I2C1_TIMINGR_PRESC 0U |
| @@ -31,7 +31,7 @@ | |||
| 31 | #define I2C1_TIMINGR_SCLH 15U | 31 | #define I2C1_TIMINGR_SCLH 15U |
| 32 | #define I2C1_TIMINGR_SCLL 51U | 32 | #define I2C1_TIMINGR_SCLL 51U |
| 33 | 33 | ||
| 34 | #define CKLED2001_PHASE_CHANNEL CKLED2001_MSKPHASE_9CHANNEL | 34 | #define SNLED27351_PHASE_CHANNEL SNLED27351_MSKPHASE_9CHANNEL |
| 35 | 35 | ||
| 36 | /* DIP switch */ | 36 | /* DIP switch */ |
| 37 | #define DIP_SWITCH_MATRIX_GRID { {5, 4} } | 37 | #define DIP_SWITCH_MATRIX_GRID { {5, 4} } |
diff --git a/keyboards/keychron/v3/iso/info.json b/keyboards/keychron/v3/iso/info.json index 18c73a8f58..56796b5eb2 100644 --- a/keyboards/keychron/v3/iso/info.json +++ b/keyboards/keychron/v3/iso/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "processor": "STM32L432", | 14 | "processor": "STM32L432", |
| 15 | "bootloader": "stm32-dfu", | 15 | "bootloader": "stm32-dfu", |
diff --git a/keyboards/keychron/v3/iso/iso.c b/keyboards/keychron/v3/iso/iso.c index 95b324d11b..24b406467a 100644 --- a/keyboards/keychron/v3/iso/iso.c +++ b/keyboards/keychron/v3/iso/iso.c | |||
| @@ -18,8 +18,8 @@ | |||
| 18 | 18 | ||
| 19 | #ifdef RGB_MATRIX_ENABLE | 19 | #ifdef RGB_MATRIX_ENABLE |
| 20 | 20 | ||
| 21 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 21 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 22 | /* Refer to IS31 manual for these locations | 22 | /* Refer to SNLED27351 manual for these locations |
| 23 | * driver | 23 | * driver |
| 24 | * | R location | 24 | * | R location |
| 25 | * | | G location | 25 | * | | G location |
diff --git a/keyboards/keychron/v3/iso_encoder/info.json b/keyboards/keychron/v3/iso_encoder/info.json index 60c56a6b87..057e4a8d7d 100644 --- a/keyboards/keychron/v3/iso_encoder/info.json +++ b/keyboards/keychron/v3/iso_encoder/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "encoder": { | 14 | "encoder": { |
| 15 | "rotary": [ | 15 | "rotary": [ |
diff --git a/keyboards/keychron/v3/iso_encoder/iso_encoder.c b/keyboards/keychron/v3/iso_encoder/iso_encoder.c index 6231172fde..53fe99aac0 100644 --- a/keyboards/keychron/v3/iso_encoder/iso_encoder.c +++ b/keyboards/keychron/v3/iso_encoder/iso_encoder.c | |||
| @@ -18,8 +18,8 @@ | |||
| 18 | 18 | ||
| 19 | #ifdef RGB_MATRIX_ENABLE | 19 | #ifdef RGB_MATRIX_ENABLE |
| 20 | 20 | ||
| 21 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 21 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 22 | /* Refer to IS31 manual for these locations | 22 | /* Refer to SNLED27351 manual for these locations |
| 23 | * driver | 23 | * driver |
| 24 | * | R location | 24 | * | R location |
| 25 | * | | G location | 25 | * | | G location |
diff --git a/keyboards/keychron/v3/jis/config.h b/keyboards/keychron/v3/jis/config.h index f19e7538c2..10c77c74f0 100644 --- a/keyboards/keychron/v3/jis/config.h +++ b/keyboards/keychron/v3/jis/config.h | |||
| @@ -30,7 +30,7 @@ | |||
| 30 | #define DRIVER_2_LED_TOTAL 43 | 30 | #define DRIVER_2_LED_TOTAL 43 |
| 31 | #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) | 31 | #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) |
| 32 | 32 | ||
| 33 | #define CKLED2001_CURRENT_TUNE \ | 33 | #define SNLED27351_CURRENT_TUNE \ |
| 34 | { 0x94, 0x94, 0x44, 0x94, 0x94, 0x44, 0x94, 0x94, 0x44, 0x94, 0x94, 0x44 } | 34 | { 0x94, 0x94, 0x44, 0x94, 0x94, 0x44, 0x94, 0x94, 0x44, 0x94, 0x94, 0x44 } |
| 35 | 35 | ||
| 36 | /* Enable CapsLcok LED */ | 36 | /* Enable CapsLcok LED */ |
diff --git a/keyboards/keychron/v3/jis/info.json b/keyboards/keychron/v3/jis/info.json index 9b97707b2f..d5601a3b34 100644 --- a/keyboards/keychron/v3/jis/info.json +++ b/keyboards/keychron/v3/jis/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "processor": "STM32L432", | 14 | "processor": "STM32L432", |
| 15 | "bootloader": "stm32-dfu", | 15 | "bootloader": "stm32-dfu", |
diff --git a/keyboards/keychron/v3/jis/jis.c b/keyboards/keychron/v3/jis/jis.c index 7e05aa4063..70dbf812fa 100644 --- a/keyboards/keychron/v3/jis/jis.c +++ b/keyboards/keychron/v3/jis/jis.c | |||
| @@ -18,8 +18,8 @@ | |||
| 18 | 18 | ||
| 19 | #ifdef RGB_MATRIX_ENABLE | 19 | #ifdef RGB_MATRIX_ENABLE |
| 20 | 20 | ||
| 21 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 21 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 22 | /* Refer to IS31 manual for these locations | 22 | /* Refer to SNLED27351 manual for these locations |
| 23 | * driver | 23 | * driver |
| 24 | * | R location | 24 | * | R location |
| 25 | * | | G location | 25 | * | | G location |
diff --git a/keyboards/keychron/v3/jis_encoder/config.h b/keyboards/keychron/v3/jis_encoder/config.h index 5f67d6a870..27f37cbed4 100644 --- a/keyboards/keychron/v3/jis_encoder/config.h +++ b/keyboards/keychron/v3/jis_encoder/config.h | |||
| @@ -27,7 +27,7 @@ | |||
| 27 | #define DRIVER_2_LED_TOTAL 43 | 27 | #define DRIVER_2_LED_TOTAL 43 |
| 28 | #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) | 28 | #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) |
| 29 | 29 | ||
| 30 | #define CKLED2001_CURRENT_TUNE \ | 30 | #define SNLED27351_CURRENT_TUNE \ |
| 31 | { 0x94, 0x94, 0x44, 0x94, 0x94, 0x44, 0x94, 0x94, 0x44, 0x94, 0x94, 0x44 } | 31 | { 0x94, 0x94, 0x44, 0x94, 0x94, 0x44, 0x94, 0x94, 0x44, 0x94, 0x94, 0x44 } |
| 32 | 32 | ||
| 33 | /* Encoder Configuration */ | 33 | /* Encoder Configuration */ |
diff --git a/keyboards/keychron/v3/jis_encoder/info.json b/keyboards/keychron/v3/jis_encoder/info.json index 585cf4519e..968c0396e9 100644 --- a/keyboards/keychron/v3/jis_encoder/info.json +++ b/keyboards/keychron/v3/jis_encoder/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "encoder": { | 14 | "encoder": { |
| 15 | "rotary": [ | 15 | "rotary": [ |
diff --git a/keyboards/keychron/v3/jis_encoder/jis_encoder.c b/keyboards/keychron/v3/jis_encoder/jis_encoder.c index 41b1c1e5af..cf1065eed9 100644 --- a/keyboards/keychron/v3/jis_encoder/jis_encoder.c +++ b/keyboards/keychron/v3/jis_encoder/jis_encoder.c | |||
| @@ -18,8 +18,8 @@ | |||
| 18 | 18 | ||
| 19 | #ifdef RGB_MATRIX_ENABLE | 19 | #ifdef RGB_MATRIX_ENABLE |
| 20 | 20 | ||
| 21 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 21 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 22 | /* Refer to IS31 manual for these locations | 22 | /* Refer to SNLED27351 manual for these locations |
| 23 | * driver | 23 | * driver |
| 24 | * | R location | 24 | * | R location |
| 25 | * | | G location | 25 | * | | G location |
diff --git a/keyboards/keychron/v4/ansi/ansi.c b/keyboards/keychron/v4/ansi/ansi.c index 44056459f9..6326405380 100644 --- a/keyboards/keychron/v4/ansi/ansi.c +++ b/keyboards/keychron/v4/ansi/ansi.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to CKLED manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/v4/ansi/info.json b/keyboards/keychron/v4/ansi/info.json index 812aec53a7..5fad0ca9b1 100644 --- a/keyboards/keychron/v4/ansi/info.json +++ b/keyboards/keychron/v4/ansi/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "matrix_pins": { | 14 | "matrix_pins": { |
| 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9"], | 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9"], |
diff --git a/keyboards/keychron/v4/config.h b/keyboards/keychron/v4/config.h index 2fc94aaaee..fb0b2cd276 100644 --- a/keyboards/keychron/v4/config.h +++ b/keyboards/keychron/v4/config.h | |||
| @@ -17,8 +17,8 @@ | |||
| 17 | #pragma once | 17 | #pragma once |
| 18 | 18 | ||
| 19 | /* RGB Matrix Driver Configuration */ | 19 | /* RGB Matrix Driver Configuration */ |
| 20 | #define CKLED2001_DRIVER_COUNT 1 | 20 | #define SNLED27351_DRIVER_COUNT 1 |
| 21 | #define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO | 21 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO |
| 22 | 22 | ||
| 23 | /* Increase I2C speed to 1000 KHz */ | 23 | /* Increase I2C speed to 1000 KHz */ |
| 24 | #define I2C1_TIMINGR_PRESC 0U | 24 | #define I2C1_TIMINGR_PRESC 0U |
| @@ -27,7 +27,7 @@ | |||
| 27 | #define I2C1_TIMINGR_SCLH 15U | 27 | #define I2C1_TIMINGR_SCLH 15U |
| 28 | #define I2C1_TIMINGR_SCLL 51U | 28 | #define I2C1_TIMINGR_SCLL 51U |
| 29 | 29 | ||
| 30 | #define CKLED2001_CURRENT_TUNE \ | 30 | #define SNLED27351_CURRENT_TUNE \ |
| 31 | { 0xD0, 0xD0, 0x60, 0xD0, 0xD0, 0x60, 0xD0, 0xD0, 0x60, 0xD0, 0xD0, 0x60 } | 31 | { 0xD0, 0xD0, 0x60, 0xD0, 0xD0, 0x60, 0xD0, 0xD0, 0x60, 0xD0, 0xD0, 0x60 } |
| 32 | 32 | ||
| 33 | /* DIP switch */ | 33 | /* DIP switch */ |
diff --git a/keyboards/keychron/v4/iso/info.json b/keyboards/keychron/v4/iso/info.json index 7d4a8eae1d..a53d3ee6a4 100644 --- a/keyboards/keychron/v4/iso/info.json +++ b/keyboards/keychron/v4/iso/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "matrix_pins": { | 14 | "matrix_pins": { |
| 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9"], | 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9"], |
diff --git a/keyboards/keychron/v4/iso/iso.c b/keyboards/keychron/v4/iso/iso.c index 8f86aa0498..9116135a4a 100644 --- a/keyboards/keychron/v4/iso/iso.c +++ b/keyboards/keychron/v4/iso/iso.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to CKLED manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/v5/ansi/ansi.c b/keyboards/keychron/v5/ansi/ansi.c index f4525dc3dc..073fb0cde0 100644 --- a/keyboards/keychron/v5/ansi/ansi.c +++ b/keyboards/keychron/v5/ansi/ansi.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to IS31 manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/v5/ansi/info.json b/keyboards/keychron/v5/ansi/info.json index bc5eec2ca5..eb5cdca90b 100644 --- a/keyboards/keychron/v5/ansi/info.json +++ b/keyboards/keychron/v5/ansi/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "processor": "STM32L432", | 14 | "processor": "STM32L432", |
| 15 | "bootloader": "stm32-dfu", | 15 | "bootloader": "stm32-dfu", |
diff --git a/keyboards/keychron/v5/ansi_encoder/ansi_encoder.c b/keyboards/keychron/v5/ansi_encoder/ansi_encoder.c index 1e3b303896..62ebc3f7b3 100644 --- a/keyboards/keychron/v5/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/v5/ansi_encoder/ansi_encoder.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to IS31 manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/v5/ansi_encoder/info.json b/keyboards/keychron/v5/ansi_encoder/info.json index 8a4aec4e36..00079fca47 100644 --- a/keyboards/keychron/v5/ansi_encoder/info.json +++ b/keyboards/keychron/v5/ansi_encoder/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "encoder": { | 14 | "encoder": { |
| 15 | "rotary": [ | 15 | "rotary": [ |
diff --git a/keyboards/keychron/v5/config.h b/keyboards/keychron/v5/config.h index 0ee5e4e46b..bca7f6d1cf 100644 --- a/keyboards/keychron/v5/config.h +++ b/keyboards/keychron/v5/config.h | |||
| @@ -26,9 +26,9 @@ | |||
| 26 | #define DIODE_DIRECTION ROW2COL | 26 | #define DIODE_DIRECTION ROW2COL |
| 27 | 27 | ||
| 28 | /* RGB Matrix Driver Configuration */ | 28 | /* RGB Matrix Driver Configuration */ |
| 29 | #define CKLED2001_DRIVER_COUNT 2 | 29 | #define SNLED27351_DRIVER_COUNT 2 |
| 30 | #define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO | 30 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO |
| 31 | #define DRIVER_ADDR_2 CKLED2001_I2C_ADDRESS_GND | 31 | #define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_GND |
| 32 | 32 | ||
| 33 | /* Increase I2C speed to 1000 KHz */ | 33 | /* Increase I2C speed to 1000 KHz */ |
| 34 | #define I2C1_TIMINGR_PRESC 0U | 34 | #define I2C1_TIMINGR_PRESC 0U |
| @@ -37,7 +37,7 @@ | |||
| 37 | #define I2C1_TIMINGR_SCLH 15U | 37 | #define I2C1_TIMINGR_SCLH 15U |
| 38 | #define I2C1_TIMINGR_SCLL 51U | 38 | #define I2C1_TIMINGR_SCLL 51U |
| 39 | 39 | ||
| 40 | #define CKLED2001_CURRENT_TUNE \ | 40 | #define SNLED27351_CURRENT_TUNE \ |
| 41 | { 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56 } | 41 | { 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56 } |
| 42 | 42 | ||
| 43 | /* DIP switch */ | 43 | /* DIP switch */ |
diff --git a/keyboards/keychron/v5/iso/info.json b/keyboards/keychron/v5/iso/info.json index 02db87e9ac..badac7f49a 100644 --- a/keyboards/keychron/v5/iso/info.json +++ b/keyboards/keychron/v5/iso/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "processor": "STM32L432", | 14 | "processor": "STM32L432", |
| 15 | "bootloader": "stm32-dfu", | 15 | "bootloader": "stm32-dfu", |
diff --git a/keyboards/keychron/v5/iso/iso.c b/keyboards/keychron/v5/iso/iso.c index d67be2d530..1552de7d47 100644 --- a/keyboards/keychron/v5/iso/iso.c +++ b/keyboards/keychron/v5/iso/iso.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to IS31 manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/v5/iso_encoder/info.json b/keyboards/keychron/v5/iso_encoder/info.json index b0be43fc50..cbf77fc93a 100644 --- a/keyboards/keychron/v5/iso_encoder/info.json +++ b/keyboards/keychron/v5/iso_encoder/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "encoder": { | 14 | "encoder": { |
| 15 | "rotary": [ | 15 | "rotary": [ |
diff --git a/keyboards/keychron/v5/iso_encoder/iso_encoder.c b/keyboards/keychron/v5/iso_encoder/iso_encoder.c index 5719da5e34..95eb62ae1f 100644 --- a/keyboards/keychron/v5/iso_encoder/iso_encoder.c +++ b/keyboards/keychron/v5/iso_encoder/iso_encoder.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to IS31 manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/v6/ansi/ansi.c b/keyboards/keychron/v6/ansi/ansi.c index 4011529883..a3f1032a1e 100644 --- a/keyboards/keychron/v6/ansi/ansi.c +++ b/keyboards/keychron/v6/ansi/ansi.c | |||
| @@ -18,8 +18,8 @@ | |||
| 18 | 18 | ||
| 19 | #ifdef RGB_MATRIX_ENABLE | 19 | #ifdef RGB_MATRIX_ENABLE |
| 20 | 20 | ||
| 21 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 21 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 22 | /* Refer to IS31 manual for these locations | 22 | /* Refer to SNLED27351 manual for these locations |
| 23 | * driver | 23 | * driver |
| 24 | * | R location | 24 | * | R location |
| 25 | * | | G location | 25 | * | | G location |
diff --git a/keyboards/keychron/v6/ansi/info.json b/keyboards/keychron/v6/ansi/info.json index 3f12305f06..3eee229ea8 100644 --- a/keyboards/keychron/v6/ansi/info.json +++ b/keyboards/keychron/v6/ansi/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "processor": "STM32L432", | 14 | "processor": "STM32L432", |
| 15 | "bootloader": "stm32-dfu", | 15 | "bootloader": "stm32-dfu", |
diff --git a/keyboards/keychron/v6/ansi_encoder/ansi_encoder.c b/keyboards/keychron/v6/ansi_encoder/ansi_encoder.c index 91831bf3c1..02e0de0b3d 100644 --- a/keyboards/keychron/v6/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/v6/ansi_encoder/ansi_encoder.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | #ifdef RGB_MATRIX_ENABLE | 21 | #ifdef RGB_MATRIX_ENABLE |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to IS31 manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/v6/ansi_encoder/info.json b/keyboards/keychron/v6/ansi_encoder/info.json index ad0ea78318..86ecc82e35 100644 --- a/keyboards/keychron/v6/ansi_encoder/info.json +++ b/keyboards/keychron/v6/ansi_encoder/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "encoder": { | 14 | "encoder": { |
| 15 | "rotary": [ | 15 | "rotary": [ |
diff --git a/keyboards/keychron/v6/config.h b/keyboards/keychron/v6/config.h index e836cced84..2ff53f2a67 100644 --- a/keyboards/keychron/v6/config.h +++ b/keyboards/keychron/v6/config.h | |||
| @@ -20,9 +20,9 @@ | |||
| 20 | #define DIODE_DIRECTION ROW2COL | 20 | #define DIODE_DIRECTION ROW2COL |
| 21 | 21 | ||
| 22 | /* RGB Matrix Driver Configuration */ | 22 | /* RGB Matrix Driver Configuration */ |
| 23 | #define CKLED2001_DRIVER_COUNT 2 | 23 | #define SNLED27351_DRIVER_COUNT 2 |
| 24 | #define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO | 24 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO |
| 25 | #define DRIVER_ADDR_2 CKLED2001_I2C_ADDRESS_GND | 25 | #define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_GND |
| 26 | 26 | ||
| 27 | /* Increase I2C speed to 1000 KHz */ | 27 | /* Increase I2C speed to 1000 KHz */ |
| 28 | #define I2C1_TIMINGR_PRESC 0U | 28 | #define I2C1_TIMINGR_PRESC 0U |
| @@ -32,7 +32,7 @@ | |||
| 32 | #define I2C1_TIMINGR_SCLL 51U | 32 | #define I2C1_TIMINGR_SCLL 51U |
| 33 | 33 | ||
| 34 | /* Limit the maximum brigtness current of colour white to 500mA */ | 34 | /* Limit the maximum brigtness current of colour white to 500mA */ |
| 35 | #define CKLED2001_CURRENT_TUNE { 0xA8, 0xA8, 0x48, 0xA8, 0xA8, 0x48, 0xA8, 0xA8, 0x48, 0xA8, 0xA8, 0x48 } | 35 | #define SNLED27351_CURRENT_TUNE { 0xA8, 0xA8, 0x48, 0xA8, 0xA8, 0x48, 0xA8, 0xA8, 0x48, 0xA8, 0xA8, 0x48 } |
| 36 | 36 | ||
| 37 | /* DIP switch */ | 37 | /* DIP switch */ |
| 38 | #define DIP_SWITCH_MATRIX_GRID { {5, 4} } | 38 | #define DIP_SWITCH_MATRIX_GRID { {5, 4} } |
diff --git a/keyboards/keychron/v6/iso/info.json b/keyboards/keychron/v6/iso/info.json index 0840ee9cc8..242e904cf0 100644 --- a/keyboards/keychron/v6/iso/info.json +++ b/keyboards/keychron/v6/iso/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "processor": "STM32L432", | 14 | "processor": "STM32L432", |
| 15 | "bootloader": "stm32-dfu", | 15 | "bootloader": "stm32-dfu", |
diff --git a/keyboards/keychron/v6/iso/iso.c b/keyboards/keychron/v6/iso/iso.c index 5c0e2fa396..7804ca3600 100644 --- a/keyboards/keychron/v6/iso/iso.c +++ b/keyboards/keychron/v6/iso/iso.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | #ifdef RGB_MATRIX_ENABLE | 21 | #ifdef RGB_MATRIX_ENABLE |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to IS31 manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/v6/iso_encoder/info.json b/keyboards/keychron/v6/iso_encoder/info.json index a40d4d66b6..d4237a69f4 100644 --- a/keyboards/keychron/v6/iso_encoder/info.json +++ b/keyboards/keychron/v6/iso_encoder/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "encoder": { | 14 | "encoder": { |
| 15 | "rotary": [ | 15 | "rotary": [ |
diff --git a/keyboards/keychron/v6/iso_encoder/iso_encoder.c b/keyboards/keychron/v6/iso_encoder/iso_encoder.c index 8268e5b0a9..bd9189f8b5 100644 --- a/keyboards/keychron/v6/iso_encoder/iso_encoder.c +++ b/keyboards/keychron/v6/iso_encoder/iso_encoder.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | #ifdef RGB_MATRIX_ENABLE | 21 | #ifdef RGB_MATRIX_ENABLE |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to IS31 manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/v7/ansi/ansi.c b/keyboards/keychron/v7/ansi/ansi.c index c0deea7845..07a98622a4 100644 --- a/keyboards/keychron/v7/ansi/ansi.c +++ b/keyboards/keychron/v7/ansi/ansi.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to CKLED manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/v7/ansi/info.json b/keyboards/keychron/v7/ansi/info.json index 26f31786b5..4088a20ced 100644 --- a/keyboards/keychron/v7/ansi/info.json +++ b/keyboards/keychron/v7/ansi/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "matrix_pins": { | 14 | "matrix_pins": { |
| 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "A10", "B5"], | 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "A10", "B5"], |
diff --git a/keyboards/keychron/v7/config.h b/keyboards/keychron/v7/config.h index 606f682719..e66866a33c 100644 --- a/keyboards/keychron/v7/config.h +++ b/keyboards/keychron/v7/config.h | |||
| @@ -17,9 +17,9 @@ | |||
| 17 | #pragma once | 17 | #pragma once |
| 18 | 18 | ||
| 19 | /* RGB Matrix Driver Configuration */ | 19 | /* RGB Matrix Driver Configuration */ |
| 20 | #define CKLED2001_DRIVER_COUNT 2 | 20 | #define SNLED27351_DRIVER_COUNT 2 |
| 21 | #define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO | 21 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO |
| 22 | #define DRIVER_ADDR_2 CKLED2001_I2C_ADDRESS_GND | 22 | #define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_GND |
| 23 | 23 | ||
| 24 | /* Increase I2C speed to 1000 KHz */ | 24 | /* Increase I2C speed to 1000 KHz */ |
| 25 | #define I2C1_TIMINGR_PRESC 0U | 25 | #define I2C1_TIMINGR_PRESC 0U |
| @@ -28,8 +28,8 @@ | |||
| 28 | #define I2C1_TIMINGR_SCLH 15U | 28 | #define I2C1_TIMINGR_SCLH 15U |
| 29 | #define I2C1_TIMINGR_SCLL 51U | 29 | #define I2C1_TIMINGR_SCLL 51U |
| 30 | 30 | ||
| 31 | #define CKLED2001_PHASE_CHANNEL CKLED2001_MSKPHASE_9CHANNEL | 31 | #define SNLED27351_PHASE_CHANNEL SNLED27351_MSKPHASE_9CHANNEL |
| 32 | #define CKLED2001_CURRENT_TUNE { 0xFC, 0xFC, 0x70, 0xFC, 0xFC, 0x70, 0xFC, 0xFC, 0x70, 0xFC, 0xFC, 0x70 } | 32 | #define SNLED27351_CURRENT_TUNE { 0xFC, 0xFC, 0x70, 0xFC, 0xFC, 0x70, 0xFC, 0xFC, 0x70, 0xFC, 0xFC, 0x70 } |
| 33 | 33 | ||
| 34 | /* DIP switch */ | 34 | /* DIP switch */ |
| 35 | #define DIP_SWITCH_MATRIX_GRID { {4,4} } | 35 | #define DIP_SWITCH_MATRIX_GRID { {4,4} } |
diff --git a/keyboards/keychron/v7/iso/info.json b/keyboards/keychron/v7/iso/info.json index f29d9d9a32..97588498ed 100644 --- a/keyboards/keychron/v7/iso/info.json +++ b/keyboards/keychron/v7/iso/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "matrix_pins": { | 14 | "matrix_pins": { |
| 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "A10", "B5"], | 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "A10", "B5"], |
diff --git a/keyboards/keychron/v7/iso/iso.c b/keyboards/keychron/v7/iso/iso.c index 4630059be4..a35dcb2092 100644 --- a/keyboards/keychron/v7/iso/iso.c +++ b/keyboards/keychron/v7/iso/iso.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to CKLED manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/v8/ansi/ansi.c b/keyboards/keychron/v8/ansi/ansi.c index 670ff2fbdb..bda7ba1d74 100644 --- a/keyboards/keychron/v8/ansi/ansi.c +++ b/keyboards/keychron/v8/ansi/ansi.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to CKLED manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/v8/ansi/info.json b/keyboards/keychron/v8/ansi/info.json index 02780ffcde..06a657a5a8 100644 --- a/keyboards/keychron/v8/ansi/info.json +++ b/keyboards/keychron/v8/ansi/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "matrix_pins": { | 14 | "matrix_pins": { |
| 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], | 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], |
diff --git a/keyboards/keychron/v8/ansi_encoder/ansi_encoder.c b/keyboards/keychron/v8/ansi_encoder/ansi_encoder.c index 670ff2fbdb..bda7ba1d74 100644 --- a/keyboards/keychron/v8/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/v8/ansi_encoder/ansi_encoder.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to CKLED manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/v8/ansi_encoder/info.json b/keyboards/keychron/v8/ansi_encoder/info.json index c3fc389780..6202a306c5 100644 --- a/keyboards/keychron/v8/ansi_encoder/info.json +++ b/keyboards/keychron/v8/ansi_encoder/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "matrix_pins": { | 14 | "matrix_pins": { |
| 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], | 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], |
diff --git a/keyboards/keychron/v8/config.h b/keyboards/keychron/v8/config.h index 3dc6d58518..ed4d98799a 100644 --- a/keyboards/keychron/v8/config.h +++ b/keyboards/keychron/v8/config.h | |||
| @@ -20,9 +20,9 @@ | |||
| 20 | // #define MATRIX_UNSELECT_DRIVE_HIGH | 20 | // #define MATRIX_UNSELECT_DRIVE_HIGH |
| 21 | 21 | ||
| 22 | /* RGB Matrix Driver Configuration */ | 22 | /* RGB Matrix Driver Configuration */ |
| 23 | #define CKLED2001_DRIVER_COUNT 2 | 23 | #define SNLED27351_DRIVER_COUNT 2 |
| 24 | #define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO | 24 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO |
| 25 | #define DRIVER_ADDR_2 CKLED2001_I2C_ADDRESS_GND | 25 | #define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_GND |
| 26 | 26 | ||
| 27 | /* Increase I2C speed to 1000 KHz */ | 27 | /* Increase I2C speed to 1000 KHz */ |
| 28 | #define I2C1_TIMINGR_PRESC 0U | 28 | #define I2C1_TIMINGR_PRESC 0U |
| @@ -31,8 +31,8 @@ | |||
| 31 | #define I2C1_TIMINGR_SCLH 15U | 31 | #define I2C1_TIMINGR_SCLH 15U |
| 32 | #define I2C1_TIMINGR_SCLL 51U | 32 | #define I2C1_TIMINGR_SCLL 51U |
| 33 | 33 | ||
| 34 | #define CKLED2001_PHASE_CHANNEL CKLED2001_MSKPHASE_9CHANNEL | 34 | #define SNLED27351_PHASE_CHANNEL SNLED27351_MSKPHASE_9CHANNEL |
| 35 | #define CKLED2001_CURRENT_TUNE { 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60 } | 35 | #define SNLED27351_CURRENT_TUNE { 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60 } |
| 36 | 36 | ||
| 37 | /* DIP switch */ | 37 | /* DIP switch */ |
| 38 | #define DIP_SWITCH_MATRIX_GRID { {4, 4} } | 38 | #define DIP_SWITCH_MATRIX_GRID { {4, 4} } |
diff --git a/keyboards/keychron/v8/iso/info.json b/keyboards/keychron/v8/iso/info.json index 5f30af5b1a..8b40b7d065 100644 --- a/keyboards/keychron/v8/iso/info.json +++ b/keyboards/keychron/v8/iso/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "matrix_pins": { | 14 | "matrix_pins": { |
| 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], | 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], |
diff --git a/keyboards/keychron/v8/iso/iso.c b/keyboards/keychron/v8/iso/iso.c index f64d3c4c56..88040c3ab8 100644 --- a/keyboards/keychron/v8/iso/iso.c +++ b/keyboards/keychron/v8/iso/iso.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to CKLED manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/keychron/v8/iso_encoder/info.json b/keyboards/keychron/v8/iso_encoder/info.json index e13261a2d6..3d04699651 100644 --- a/keyboards/keychron/v8/iso_encoder/info.json +++ b/keyboards/keychron/v8/iso_encoder/info.json | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | "device_version": "1.0.0" | 9 | "device_version": "1.0.0" |
| 10 | }, | 10 | }, |
| 11 | "rgb_matrix": { | 11 | "rgb_matrix": { |
| 12 | "driver": "ckled2001" | 12 | "driver": "snled27351" |
| 13 | }, | 13 | }, |
| 14 | "matrix_pins": { | 14 | "matrix_pins": { |
| 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], | 15 | "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], |
diff --git a/keyboards/keychron/v8/iso_encoder/iso_encoder.c b/keyboards/keychron/v8/iso_encoder/iso_encoder.c index f64d3c4c56..88040c3ab8 100644 --- a/keyboards/keychron/v8/iso_encoder/iso_encoder.c +++ b/keyboards/keychron/v8/iso_encoder/iso_encoder.c | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | // clang-format off | 21 | // clang-format off |
| 22 | 22 | ||
| 23 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 23 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 24 | /* Refer to CKLED manual for these locations | 24 | /* Refer to SNLED27351 manual for these locations |
| 25 | * driver | 25 | * driver |
| 26 | * | R location | 26 | * | R location |
| 27 | * | | G location | 27 | * | | G location |
diff --git a/keyboards/monsgeek/m1/config.h b/keyboards/monsgeek/m1/config.h index efec0207c3..9c25c9f21c 100644 --- a/keyboards/monsgeek/m1/config.h +++ b/keyboards/monsgeek/m1/config.h | |||
| @@ -33,9 +33,9 @@ | |||
| 33 | #define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12 | 33 | #define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12 |
| 34 | 34 | ||
| 35 | /* I2C Config for LED Driver */ | 35 | /* I2C Config for LED Driver */ |
| 36 | #define IS31FL3733_DRIVER_COUNT 2 | 36 | #define SNLED27351_DRIVER_COUNT 2 |
| 37 | #define DRIVER_ADDR_1 0b1110100 | 37 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_GND |
| 38 | #define DRIVER_ADDR_2 0b1110111 | 38 | #define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_VDDIO |
| 39 | #define I2C1_OPMODE OPMODE_I2C | 39 | #define I2C1_OPMODE OPMODE_I2C |
| 40 | #define I2C1_CLOCK_SPEED 400000 /* 400000 */ | 40 | #define I2C1_CLOCK_SPEED 400000 /* 400000 */ |
| 41 | 41 | ||
diff --git a/keyboards/monsgeek/m1/info.json b/keyboards/monsgeek/m1/info.json index 3eade9d76d..23d3d714c6 100644 --- a/keyboards/monsgeek/m1/info.json +++ b/keyboards/monsgeek/m1/info.json | |||
| @@ -42,7 +42,7 @@ | |||
| 42 | ] | 42 | ] |
| 43 | }, | 43 | }, |
| 44 | "rgb_matrix": { | 44 | "rgb_matrix": { |
| 45 | "driver": "is31fl3733", | 45 | "driver": "snled27351", |
| 46 | "max_brightness": 200, | 46 | "max_brightness": 200, |
| 47 | "val_steps": 20, | 47 | "val_steps": 20, |
| 48 | "animations": { | 48 | "animations": { |
diff --git a/keyboards/monsgeek/m1/m1.c b/keyboards/monsgeek/m1/m1.c index ac00bb4e2b..b85adbc0bf 100644 --- a/keyboards/monsgeek/m1/m1.c +++ b/keyboards/monsgeek/m1/m1.c | |||
| @@ -17,8 +17,8 @@ | |||
| 17 | #include "quantum.h" | 17 | #include "quantum.h" |
| 18 | 18 | ||
| 19 | #ifdef RGB_MATRIX_ENABLE | 19 | #ifdef RGB_MATRIX_ENABLE |
| 20 | const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { | 20 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 21 | /* Refer to IS31 manual for these locations | 21 | /* Refer to SNLED27351 manual for these locations |
| 22 | * driver | 22 | * driver |
| 23 | * | R location | 23 | * | R location |
| 24 | * | | G location | 24 | * | | G location |
diff --git a/keyboards/monsgeek/m5/config.h b/keyboards/monsgeek/m5/config.h index ef2a43cdb3..ddb700870b 100644 --- a/keyboards/monsgeek/m5/config.h +++ b/keyboards/monsgeek/m5/config.h | |||
| @@ -34,9 +34,9 @@ | |||
| 34 | #define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12 | 34 | #define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12 |
| 35 | 35 | ||
| 36 | /* I2C Config for LED Driver */ | 36 | /* I2C Config for LED Driver */ |
| 37 | #define IS31FL3733_DRIVER_COUNT 2 | 37 | #define SNLED27351_DRIVER_COUNT 2 |
| 38 | #define DRIVER_ADDR_1 0b1110100 | 38 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_GND |
| 39 | #define DRIVER_ADDR_2 0b1110111 | 39 | #define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_VDDIO |
| 40 | #define I2C1_OPMODE OPMODE_I2C | 40 | #define I2C1_OPMODE OPMODE_I2C |
| 41 | #define I2C1_CLOCK_SPEED 400000 /* 400000 */ | 41 | #define I2C1_CLOCK_SPEED 400000 /* 400000 */ |
| 42 | #define I2C1_SCL_PAL_MODE 4 | 42 | #define I2C1_SCL_PAL_MODE 4 |
diff --git a/keyboards/monsgeek/m5/info.json b/keyboards/monsgeek/m5/info.json index 7b01d2526d..e4ecba91ce 100644 --- a/keyboards/monsgeek/m5/info.json +++ b/keyboards/monsgeek/m5/info.json | |||
| @@ -40,7 +40,7 @@ | |||
| 40 | "caps_lock": "C10" | 40 | "caps_lock": "C10" |
| 41 | }, | 41 | }, |
| 42 | "rgb_matrix": { | 42 | "rgb_matrix": { |
| 43 | "driver": "is31fl3733", | 43 | "driver": "snled27351", |
| 44 | "max_brightness": 180, | 44 | "max_brightness": 180, |
| 45 | "animations": { | 45 | "animations": { |
| 46 | "breathing": true, | 46 | "breathing": true, |
diff --git a/keyboards/monsgeek/m5/m5.c b/keyboards/monsgeek/m5/m5.c index 7dbc3111bf..83dd4b6b79 100644 --- a/keyboards/monsgeek/m5/m5.c +++ b/keyboards/monsgeek/m5/m5.c | |||
| @@ -17,8 +17,8 @@ | |||
| 17 | #include "quantum.h" | 17 | #include "quantum.h" |
| 18 | // clang-format off | 18 | // clang-format off |
| 19 | #ifdef RGB_MATRIX_ENABLE | 19 | #ifdef RGB_MATRIX_ENABLE |
| 20 | const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { | 20 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 21 | /* Refer to IS31 manual for these locations | 21 | /* Refer to SNLED27351 manual for these locations |
| 22 | * driver | 22 | * driver |
| 23 | * | R location | 23 | * | R location |
| 24 | * | | G location | 24 | * | | G location |
diff --git a/keyboards/monsgeek/m6/config.h b/keyboards/monsgeek/m6/config.h index fac90ac0ad..b10220db17 100644 --- a/keyboards/monsgeek/m6/config.h +++ b/keyboards/monsgeek/m6/config.h | |||
| @@ -31,9 +31,9 @@ | |||
| 31 | #define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12 | 31 | #define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12 |
| 32 | 32 | ||
| 33 | /* I2C Config for LED Driver */ | 33 | /* I2C Config for LED Driver */ |
| 34 | #define IS31FL3733_DRIVER_COUNT 2 | 34 | #define SNLED27351_DRIVER_COUNT 2 |
| 35 | #define DRIVER_ADDR_1 0b1110100 | 35 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_GND |
| 36 | #define DRIVER_ADDR_2 0b1110111 | 36 | #define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_VDDIO |
| 37 | #define I2C1_SCL_PAL_MODE 4 | 37 | #define I2C1_SCL_PAL_MODE 4 |
| 38 | #define I2C1_OPMODE OPMODE_I2C | 38 | #define I2C1_OPMODE OPMODE_I2C |
| 39 | #define I2C1_CLOCK_SPEED 400000 /* 400000 */ | 39 | #define I2C1_CLOCK_SPEED 400000 /* 400000 */ |
diff --git a/keyboards/monsgeek/m6/info.json b/keyboards/monsgeek/m6/info.json index d3951c8046..3ec89cc497 100644 --- a/keyboards/monsgeek/m6/info.json +++ b/keyboards/monsgeek/m6/info.json | |||
| @@ -36,7 +36,7 @@ | |||
| 36 | } | 36 | } |
| 37 | }, | 37 | }, |
| 38 | "rgb_matrix": { | 38 | "rgb_matrix": { |
| 39 | "driver": "is31fl3733", | 39 | "driver": "snled27351", |
| 40 | "max_brightness": 200, | 40 | "max_brightness": 200, |
| 41 | "val_steps": 20, | 41 | "val_steps": 20, |
| 42 | "animations": { | 42 | "animations": { |
diff --git a/keyboards/monsgeek/m6/m6.c b/keyboards/monsgeek/m6/m6.c index 1823d865cc..dc20a9916f 100644 --- a/keyboards/monsgeek/m6/m6.c +++ b/keyboards/monsgeek/m6/m6.c | |||
| @@ -17,8 +17,8 @@ | |||
| 17 | #include "quantum.h" | 17 | #include "quantum.h" |
| 18 | // clang-format off | 18 | // clang-format off |
| 19 | #ifdef RGB_MATRIX_ENABLE | 19 | #ifdef RGB_MATRIX_ENABLE |
| 20 | const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { | 20 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 21 | /* Refer to IS31 manual for these locations | 21 | /* Refer to SNLED27351 manual for these locations |
| 22 | * driver | 22 | * driver |
| 23 | * | R location | 23 | * | R location |
| 24 | * | | G location | 24 | * | | G location |
diff --git a/keyboards/skyloong/gk61/v1/config.h b/keyboards/skyloong/gk61/v1/config.h index f648bf80d4..153bd8d0eb 100644 --- a/keyboards/skyloong/gk61/v1/config.h +++ b/keyboards/skyloong/gk61/v1/config.h | |||
| @@ -15,22 +15,9 @@ | |||
| 15 | */ | 15 | */ |
| 16 | #pragma once | 16 | #pragma once |
| 17 | 17 | ||
| 18 | /* | 18 | #define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_GND |
| 19 | * RGB matrix driver config (CKLED2001) | ||
| 20 | * | ||
| 21 | * This is a 7-bit address, that gets left-shifted and bit 0 | ||
| 22 | * set to 0 for write, 1 for read (as per I2C protocol) | ||
| 23 | * The address will vary depending on your wiring: | ||
| 24 | * 00 <-> GND | ||
| 25 | * 01 <-> SCL | ||
| 26 | * 10 <-> SDA | ||
| 27 | * 11 <-> VCC | ||
| 28 | * ADDR/CS represents A1:A0 of the 7-bit address. | ||
| 29 | * The result is: 0b11101(ADDR/CS) | ||
| 30 | */ | ||
| 31 | #define DRIVER_ADDR_1 0b1110100 | ||
| 32 | 19 | ||
| 33 | #define DRIVER_COUNT 1 | 20 | #define SNLED27351_DRIVER_COUNT 1 |
| 34 | #define RGB_MATRIX_LED_COUNT 64 | 21 | #define RGB_MATRIX_LED_COUNT 64 |
| 35 | 22 | ||
| 36 | #define RGB_MATRIX_FRAMEBUFFER_EFFECTS //Enable frame effects | 23 | #define RGB_MATRIX_FRAMEBUFFER_EFFECTS //Enable frame effects |
diff --git a/keyboards/skyloong/gk61/v1/info.json b/keyboards/skyloong/gk61/v1/info.json index 8e30cc3bc0..6015efa12c 100644 --- a/keyboards/skyloong/gk61/v1/info.json +++ b/keyboards/skyloong/gk61/v1/info.json | |||
| @@ -42,7 +42,7 @@ | |||
| 42 | "splash": true, | 42 | "splash": true, |
| 43 | "solid_splash": true | 43 | "solid_splash": true |
| 44 | }, | 44 | }, |
| 45 | "driver": "ckled2001", | 45 | "driver": "snled27351", |
| 46 | "hue_steps": 20, | 46 | "hue_steps": 20, |
| 47 | "layout": [ | 47 | "layout": [ |
| 48 | {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, | 48 | {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, |
diff --git a/keyboards/skyloong/gk61/v1/v1.c b/keyboards/skyloong/gk61/v1/v1.c index 5fed5701b2..cb3772f6b4 100644 --- a/keyboards/skyloong/gk61/v1/v1.c +++ b/keyboards/skyloong/gk61/v1/v1.c | |||
| @@ -17,8 +17,8 @@ | |||
| 17 | 17 | ||
| 18 | #ifdef RGB_MATRIX_ENABLE | 18 | #ifdef RGB_MATRIX_ENABLE |
| 19 | 19 | ||
| 20 | const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { | 20 | const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { |
| 21 | /* Refer to CKLED2001 manual for these locations | 21 | /* Refer to SNLED27351 manual for these locations |
| 22 | * driver | 22 | * driver |
| 23 | * | R location | 23 | * | R location |
| 24 | * | | G location | 24 | * | | G location |
diff --git a/quantum/led_matrix/led_matrix.h b/quantum/led_matrix/led_matrix.h index 47803d2423..77d4f558ac 100644 --- a/quantum/led_matrix/led_matrix.h +++ b/quantum/led_matrix/led_matrix.h | |||
| @@ -45,8 +45,8 @@ | |||
| 45 | #if defined(IS31FLCOMMON) | 45 | #if defined(IS31FLCOMMON) |
| 46 | # include "is31flcommon.h" | 46 | # include "is31flcommon.h" |
| 47 | #endif | 47 | #endif |
| 48 | #ifdef LED_MATRIX_CKLED2001 | 48 | #ifdef LED_MATRIX_SNLED27351 |
| 49 | # include "ckled2001-simple.h" | 49 | # include "snled27351-simple.h" |
| 50 | #endif | 50 | #endif |
| 51 | 51 | ||
| 52 | #ifndef LED_MATRIX_TIMEOUT | 52 | #ifndef LED_MATRIX_TIMEOUT |
diff --git a/quantum/led_matrix/led_matrix_drivers.c b/quantum/led_matrix/led_matrix_drivers.c index 771ce820af..f52870aea5 100644 --- a/quantum/led_matrix/led_matrix_drivers.c +++ b/quantum/led_matrix/led_matrix_drivers.c | |||
| @@ -25,7 +25,7 @@ | |||
| 25 | * in their own files. | 25 | * in their own files. |
| 26 | */ | 26 | */ |
| 27 | 27 | ||
| 28 | #if defined(LED_MATRIX_IS31FL3218) || defined(LED_MATRIX_IS31FL3731) || defined(LED_MATRIX_IS31FL3733) || defined(LED_MATRIX_IS31FL3736) || defined(LED_MATRIX_IS31FL3737) || defined(LED_MATRIX_IS31FL3741) || defined(IS31FLCOMMON) || defined(LED_MATRIX_CKLED2001) | 28 | #if defined(LED_MATRIX_IS31FL3218) || defined(LED_MATRIX_IS31FL3731) || defined(LED_MATRIX_IS31FL3733) || defined(LED_MATRIX_IS31FL3736) || defined(LED_MATRIX_IS31FL3737) || defined(LED_MATRIX_IS31FL3741) || defined(IS31FLCOMMON) || defined(LED_MATRIX_SNLED27351) |
| 29 | # include "i2c_master.h" | 29 | # include "i2c_master.h" |
| 30 | 30 | ||
| 31 | static void init(void) { | 31 | static void init(void) { |
| @@ -117,19 +117,19 @@ static void init(void) { | |||
| 117 | # endif | 117 | # endif |
| 118 | # endif | 118 | # endif |
| 119 | # endif | 119 | # endif |
| 120 | # elif defined(LED_MATRIX_CKLED2001) | 120 | # elif defined(LED_MATRIX_SNLED27351) |
| 121 | # if defined(LED_DRIVER_SHUTDOWN_PIN) | 121 | # if defined(LED_DRIVER_SHUTDOWN_PIN) |
| 122 | setPinOutput(LED_DRIVER_SHUTDOWN_PIN); | 122 | setPinOutput(LED_DRIVER_SHUTDOWN_PIN); |
| 123 | writePinHigh(LED_DRIVER_SHUTDOWN_PIN); | 123 | writePinHigh(LED_DRIVER_SHUTDOWN_PIN); |
| 124 | # endif | 124 | # endif |
| 125 | 125 | ||
| 126 | ckled2001_init(DRIVER_ADDR_1); | 126 | snled27351_init(DRIVER_ADDR_1); |
| 127 | # if defined(DRIVER_ADDR_2) | 127 | # if defined(DRIVER_ADDR_2) |
| 128 | ckled2001_init(DRIVER_ADDR_2); | 128 | snled27351_init(DRIVER_ADDR_2); |
| 129 | # if defined(DRIVER_ADDR_3) | 129 | # if defined(DRIVER_ADDR_3) |
| 130 | ckled2001_init(DRIVER_ADDR_3); | 130 | snled27351_init(DRIVER_ADDR_3); |
| 131 | # if defined(DRIVER_ADDR_4) | 131 | # if defined(DRIVER_ADDR_4) |
| 132 | ckled2001_init(DRIVER_ADDR_4); | 132 | snled27351_init(DRIVER_ADDR_4); |
| 133 | # endif | 133 | # endif |
| 134 | # endif | 134 | # endif |
| 135 | # endif | 135 | # endif |
| @@ -150,8 +150,8 @@ static void init(void) { | |||
| 150 | is31fl3741_set_led_control_register(index, true); | 150 | is31fl3741_set_led_control_register(index, true); |
| 151 | # elif defined(IS31FLCOMMON) | 151 | # elif defined(IS31FLCOMMON) |
| 152 | IS31FL_simple_set_scaling_buffer(index, true); | 152 | IS31FL_simple_set_scaling_buffer(index, true); |
| 153 | # elif defined(LED_MATRIX_CKLED2001) | 153 | # elif defined(LED_MATRIX_SNLED27351) |
| 154 | ckled2001_set_led_control_register(index, true); | 154 | snled27351_set_led_control_register(index, true); |
| 155 | # endif | 155 | # endif |
| 156 | } | 156 | } |
| 157 | 157 | ||
| @@ -233,14 +233,14 @@ static void init(void) { | |||
| 233 | # endif | 233 | # endif |
| 234 | # endif | 234 | # endif |
| 235 | # endif | 235 | # endif |
| 236 | # elif defined(LED_MATRIX_CKLED2001) | 236 | # elif defined(LED_MATRIX_SNLED27351) |
| 237 | ckled2001_update_led_control_registers(DRIVER_ADDR_1, 0); | 237 | snled27351_update_led_control_registers(DRIVER_ADDR_1, 0); |
| 238 | # if defined(DRIVER_ADDR_2) | 238 | # if defined(DRIVER_ADDR_2) |
| 239 | ckled2001_update_led_control_registers(DRIVER_ADDR_2, 1); | 239 | snled27351_update_led_control_registers(DRIVER_ADDR_2, 1); |
| 240 | # if defined(DRIVER_ADDR_3) | 240 | # if defined(DRIVER_ADDR_3) |
| 241 | ckled2001_update_led_control_registers(DRIVER_ADDR_3, 2); | 241 | snled27351_update_led_control_registers(DRIVER_ADDR_3, 2); |
| 242 | # if defined(DRIVER_ADDR_4) | 242 | # if defined(DRIVER_ADDR_4) |
| 243 | ckled2001_update_led_control_registers(DRIVER_ADDR_4, 3); | 243 | snled27351_update_led_control_registers(DRIVER_ADDR_4, 3); |
| 244 | # endif | 244 | # endif |
| 245 | # endif | 245 | # endif |
| 246 | # endif | 246 | # endif |
| @@ -384,15 +384,15 @@ const led_matrix_driver_t led_matrix_driver = { | |||
| 384 | .set_value = IS31FL_simple_set_brightness, | 384 | .set_value = IS31FL_simple_set_brightness, |
| 385 | .set_value_all = IS31FL_simple_set_brigntness_all, | 385 | .set_value_all = IS31FL_simple_set_brigntness_all, |
| 386 | }; | 386 | }; |
| 387 | # elif defined(LED_MATRIX_CKLED2001) | 387 | # elif defined(LED_MATRIX_SNLED27351) |
| 388 | static void flush(void) { | 388 | static void flush(void) { |
| 389 | ckled2001_update_pwm_buffers(DRIVER_ADDR_1, 0); | 389 | snled27351_update_pwm_buffers(DRIVER_ADDR_1, 0); |
| 390 | # if defined(DRIVER_ADDR_2) | 390 | # if defined(DRIVER_ADDR_2) |
| 391 | ckled2001_update_pwm_buffers(DRIVER_ADDR_2, 1); | 391 | snled27351_update_pwm_buffers(DRIVER_ADDR_2, 1); |
| 392 | # if defined(DRIVER_ADDR_3) | 392 | # if defined(DRIVER_ADDR_3) |
| 393 | ckled2001_update_pwm_buffers(DRIVER_ADDR_3, 2); | 393 | snled27351_update_pwm_buffers(DRIVER_ADDR_3, 2); |
| 394 | # if defined(DRIVER_ADDR_4) | 394 | # if defined(DRIVER_ADDR_4) |
| 395 | ckled2001_update_pwm_buffers(DRIVER_ADDR_4, 3); | 395 | snled27351_update_pwm_buffers(DRIVER_ADDR_4, 3); |
| 396 | # endif | 396 | # endif |
| 397 | # endif | 397 | # endif |
| 398 | # endif | 398 | # endif |
| @@ -401,8 +401,8 @@ static void flush(void) { | |||
| 401 | const led_matrix_driver_t led_matrix_driver = { | 401 | const led_matrix_driver_t led_matrix_driver = { |
| 402 | .init = init, | 402 | .init = init, |
| 403 | .flush = flush, | 403 | .flush = flush, |
| 404 | .set_value = ckled2001_set_value, | 404 | .set_value = snled27351_set_value, |
| 405 | .set_value_all = ckled2001_set_value_all, | 405 | .set_value_all = snled27351_set_value_all, |
| 406 | }; | 406 | }; |
| 407 | # endif | 407 | # endif |
| 408 | #endif | 408 | #endif |
diff --git a/quantum/rgb_matrix/rgb_matrix.h b/quantum/rgb_matrix/rgb_matrix.h index 3e1db3cdce..8ac263c635 100644 --- a/quantum/rgb_matrix/rgb_matrix.h +++ b/quantum/rgb_matrix/rgb_matrix.h | |||
| @@ -38,8 +38,8 @@ | |||
| 38 | # include "is31fl3741.h" | 38 | # include "is31fl3741.h" |
| 39 | #elif defined(IS31FLCOMMON) | 39 | #elif defined(IS31FLCOMMON) |
| 40 | # include "is31flcommon.h" | 40 | # include "is31flcommon.h" |
| 41 | #elif defined(RGB_MATRIX_CKLED2001) | 41 | #elif defined(RGB_MATRIX_SNLED27351) |
| 42 | # include "ckled2001.h" | 42 | # include "snled27351.h" |
| 43 | #elif defined(RGB_MATRIX_AW20216S) | 43 | #elif defined(RGB_MATRIX_AW20216S) |
| 44 | # include "aw20216s.h" | 44 | # include "aw20216s.h" |
| 45 | #elif defined(RGB_MATRIX_WS2812) | 45 | #elif defined(RGB_MATRIX_WS2812) |
diff --git a/quantum/rgb_matrix/rgb_matrix_drivers.c b/quantum/rgb_matrix/rgb_matrix_drivers.c index 58b707bf7f..06d82b9c69 100644 --- a/quantum/rgb_matrix/rgb_matrix_drivers.c +++ b/quantum/rgb_matrix/rgb_matrix_drivers.c | |||
| @@ -24,7 +24,7 @@ | |||
| 24 | * be here if shared between boards. | 24 | * be here if shared between boards. |
| 25 | */ | 25 | */ |
| 26 | 26 | ||
| 27 | #if defined(RGB_MATRIX_IS31FL3218) || defined(RGB_MATRIX_IS31FL3731) || defined(RGB_MATRIX_IS31FL3733) || defined(RGB_MATRIX_IS31FL3736) || defined(RGB_MATRIX_IS31FL3737) || defined(RGB_MATRIX_IS31FL3741) || defined(IS31FLCOMMON) || defined(RGB_MATRIX_CKLED2001) | 27 | #if defined(RGB_MATRIX_IS31FL3218) || defined(RGB_MATRIX_IS31FL3731) || defined(RGB_MATRIX_IS31FL3733) || defined(RGB_MATRIX_IS31FL3736) || defined(RGB_MATRIX_IS31FL3737) || defined(RGB_MATRIX_IS31FL3741) || defined(IS31FLCOMMON) || defined(RGB_MATRIX_SNLED27351) |
| 28 | # include "i2c_master.h" | 28 | # include "i2c_master.h" |
| 29 | 29 | ||
| 30 | // TODO: Remove this at some later date | 30 | // TODO: Remove this at some later date |
| @@ -124,14 +124,14 @@ static void init(void) { | |||
| 124 | # endif | 124 | # endif |
| 125 | # endif | 125 | # endif |
| 126 | 126 | ||
| 127 | # elif defined(RGB_MATRIX_CKLED2001) | 127 | # elif defined(RGB_MATRIX_SNLED27351) |
| 128 | ckled2001_init(DRIVER_ADDR_1); | 128 | snled27351_init(DRIVER_ADDR_1); |
| 129 | # if defined(DRIVER_ADDR_2) | 129 | # if defined(DRIVER_ADDR_2) |
| 130 | ckled2001_init(DRIVER_ADDR_2); | 130 | snled27351_init(DRIVER_ADDR_2); |
| 131 | # if defined(DRIVER_ADDR_3) | 131 | # if defined(DRIVER_ADDR_3) |
| 132 | ckled2001_init(DRIVER_ADDR_3); | 132 | snled27351_init(DRIVER_ADDR_3); |
| 133 | # if defined(DRIVER_ADDR_4) | 133 | # if defined(DRIVER_ADDR_4) |
| 134 | ckled2001_init(DRIVER_ADDR_4); | 134 | snled27351_init(DRIVER_ADDR_4); |
| 135 | # endif | 135 | # endif |
| 136 | # endif | 136 | # endif |
| 137 | # endif | 137 | # endif |
| @@ -155,8 +155,8 @@ static void init(void) { | |||
| 155 | is31fl3741_set_led_control_register(index, enabled, enabled, enabled); | 155 | is31fl3741_set_led_control_register(index, enabled, enabled, enabled); |
| 156 | # elif defined(IS31FLCOMMON) | 156 | # elif defined(IS31FLCOMMON) |
| 157 | IS31FL_RGB_set_scaling_buffer(index, enabled, enabled, enabled); | 157 | IS31FL_RGB_set_scaling_buffer(index, enabled, enabled, enabled); |
| 158 | # elif defined(RGB_MATRIX_CKLED2001) | 158 | # elif defined(RGB_MATRIX_SNLED27351) |
| 159 | ckled2001_set_led_control_register(index, enabled, enabled, enabled); | 159 | snled27351_set_led_control_register(index, enabled, enabled, enabled); |
| 160 | # endif | 160 | # endif |
| 161 | } | 161 | } |
| 162 | 162 | ||
| @@ -239,14 +239,14 @@ static void init(void) { | |||
| 239 | # endif | 239 | # endif |
| 240 | # endif | 240 | # endif |
| 241 | 241 | ||
| 242 | # elif defined(RGB_MATRIX_CKLED2001) | 242 | # elif defined(RGB_MATRIX_SNLED27351) |
| 243 | ckled2001_update_led_control_registers(DRIVER_ADDR_1, 0); | 243 | snled27351_update_led_control_registers(DRIVER_ADDR_1, 0); |
| 244 | # if defined(DRIVER_ADDR_2) | 244 | # if defined(DRIVER_ADDR_2) |
| 245 | ckled2001_update_led_control_registers(DRIVER_ADDR_2, 1); | 245 | snled27351_update_led_control_registers(DRIVER_ADDR_2, 1); |
| 246 | # if defined(DRIVER_ADDR_3) | 246 | # if defined(DRIVER_ADDR_3) |
| 247 | ckled2001_update_led_control_registers(DRIVER_ADDR_3, 2); | 247 | snled27351_update_led_control_registers(DRIVER_ADDR_3, 2); |
| 248 | # if defined(DRIVER_ADDR_4) | 248 | # if defined(DRIVER_ADDR_4) |
| 249 | ckled2001_update_led_control_registers(DRIVER_ADDR_4, 3); | 249 | snled27351_update_led_control_registers(DRIVER_ADDR_4, 3); |
| 250 | # endif | 250 | # endif |
| 251 | # endif | 251 | # endif |
| 252 | # endif | 252 | # endif |
| @@ -391,15 +391,15 @@ const rgb_matrix_driver_t rgb_matrix_driver = { | |||
| 391 | .set_color_all = IS31FL_RGB_set_color_all, | 391 | .set_color_all = IS31FL_RGB_set_color_all, |
| 392 | }; | 392 | }; |
| 393 | 393 | ||
| 394 | # elif defined(RGB_MATRIX_CKLED2001) | 394 | # elif defined(RGB_MATRIX_SNLED27351) |
| 395 | static void flush(void) { | 395 | static void flush(void) { |
| 396 | ckled2001_update_pwm_buffers(DRIVER_ADDR_1, 0); | 396 | snled27351_update_pwm_buffers(DRIVER_ADDR_1, 0); |
| 397 | # if defined(DRIVER_ADDR_2) | 397 | # if defined(DRIVER_ADDR_2) |
| 398 | ckled2001_update_pwm_buffers(DRIVER_ADDR_2, 1); | 398 | snled27351_update_pwm_buffers(DRIVER_ADDR_2, 1); |
| 399 | # if defined(DRIVER_ADDR_3) | 399 | # if defined(DRIVER_ADDR_3) |
| 400 | ckled2001_update_pwm_buffers(DRIVER_ADDR_3, 2); | 400 | snled27351_update_pwm_buffers(DRIVER_ADDR_3, 2); |
| 401 | # if defined(DRIVER_ADDR_4) | 401 | # if defined(DRIVER_ADDR_4) |
| 402 | ckled2001_update_pwm_buffers(DRIVER_ADDR_4, 3); | 402 | snled27351_update_pwm_buffers(DRIVER_ADDR_4, 3); |
| 403 | # endif | 403 | # endif |
| 404 | # endif | 404 | # endif |
| 405 | # endif | 405 | # endif |
| @@ -408,8 +408,8 @@ static void flush(void) { | |||
| 408 | const rgb_matrix_driver_t rgb_matrix_driver = { | 408 | const rgb_matrix_driver_t rgb_matrix_driver = { |
| 409 | .init = init, | 409 | .init = init, |
| 410 | .flush = flush, | 410 | .flush = flush, |
| 411 | .set_color = ckled2001_set_color, | 411 | .set_color = snled27351_set_color, |
| 412 | .set_color_all = ckled2001_set_color_all, | 412 | .set_color_all = snled27351_set_color_all, |
| 413 | }; | 413 | }; |
| 414 | # endif | 414 | # endif |
| 415 | 415 | ||
