From f583d2fef01372f55057dcf44569252e3582d0f5 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 2 Jan 2024 16:26:01 +1100 Subject: [PATCH] Remove IS31FLCOMMON code (#22800) --- drivers/led/issi/is31flcommon.c | 329 ------------------ drivers/led/issi/is31flcommon.h | 84 ----- keyboards/akko/5087/config.h | 6 +- keyboards/akko/5087/info.json | 2 +- .../darkproject/kd83a_bfg_edition/config.h | 8 +- .../darkproject/kd83a_bfg_edition/info.json | 2 +- .../darkproject/kd87a_bfg_edition/config.h | 8 +- .../darkproject/kd87a_bfg_edition/info.json | 2 +- keyboards/jukaie/jk01/config.h | 8 +- keyboards/jukaie/jk01/info.json | 2 +- keyboards/kprepublic/cstc40/config.h | 2 +- keyboards/orthograph/orthograph.c | 2 +- keyboards/phentech/rpk_001/config.h | 4 +- keyboards/phentech/rpk_001/info.json | 2 +- keyboards/projectd/75/ansi/config.h | 8 +- keyboards/projectd/75/ansi/info.json | 2 +- keyboards/qwertykeys/qk100/ansi/config.h | 2 +- quantum/led_matrix/led_matrix_drivers.c | 8 - quantum/led_matrix/led_matrix_drivers.h | 2 - quantum/rgb_matrix/rgb_matrix_drivers.c | 8 - quantum/rgb_matrix/rgb_matrix_drivers.h | 2 - 21 files changed, 30 insertions(+), 463 deletions(-) delete mode 100644 drivers/led/issi/is31flcommon.c delete mode 100644 drivers/led/issi/is31flcommon.h diff --git a/drivers/led/issi/is31flcommon.c b/drivers/led/issi/is31flcommon.c deleted file mode 100644 index 048db286b62..00000000000 --- a/drivers/led/issi/is31flcommon.c +++ /dev/null @@ -1,329 +0,0 @@ -/* Copyright 2017 Jason Williams - * Copyright 2018 Jack Humbert - * Copyright 2018 Yiancar - * Copyright 2020 MelGeek - * Copyright 2021 MasterSpoon - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "is31flcommon.h" -#include "i2c_master.h" -#include "wait.h" -#include - -// Set defaults for Timeout and Persistence -#ifndef ISSI_TIMEOUT -# define ISSI_TIMEOUT 100 -#endif -#ifndef ISSI_PERSISTENCE -# define ISSI_PERSISTENCE 0 -#endif - -uint8_t i2c_transfer_buffer[20]; - -// These buffers match the PWM & scaling registers. -// Storing them like this is optimal for I2C transfers to the registers. -uint8_t g_pwm_buffer[DRIVER_COUNT][ISSI_MAX_LEDS]; -bool g_pwm_buffer_update_required[DRIVER_COUNT] = {false}; - -uint8_t g_scaling_buffer[DRIVER_COUNT][ISSI_SCALING_SIZE]; -bool g_scaling_buffer_update_required[DRIVER_COUNT] = {false}; - -// For writing of single register entry -void IS31FL_write_single_register(uint8_t addr, uint8_t reg, uint8_t data) { - // Set register address and register data ready to write - i2c_transfer_buffer[0] = reg; - i2c_transfer_buffer[1] = data; - -#if ISSI_PERSISTENCE > 0 - for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) { - if (i2c_transmit(addr << 1, i2c_transfer_buffer, 2, ISSI_TIMEOUT) == 0) break; - } -#else - i2c_transmit(addr << 1, i2c_transfer_buffer, 2, ISSI_TIMEOUT); -#endif -} - -// For writing of mulitple register entries to make use of address auto increment -// Once the controller has been called and we have written the first bit of data -// the controller will move to the next register meaning we can write sequential blocks. -bool IS31FL_write_multi_registers(uint8_t addr, uint8_t *source_buffer, uint8_t buffer_size, uint8_t transfer_size, uint8_t start_reg_addr) { - // Split the buffer into chunks to transfer - for (int i = 0; i < buffer_size; i += transfer_size) { - // Set the first entry of transfer buffer to the first register we want to write - i2c_transfer_buffer[0] = i + start_reg_addr; - // Copy the section of our source buffer into the transfer buffer after first register address - memcpy(i2c_transfer_buffer + 1, source_buffer + i, transfer_size); - -#if ISSI_PERSISTENCE > 0 - for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) { - if (i2c_transmit(addr << 1, i2c_transfer_buffer, transfer_size + 1, ISSI_TIMEOUT) != 0) { - return false; - } - } -#else - if (i2c_transmit(addr << 1, i2c_transfer_buffer, transfer_size + 1, ISSI_TIMEOUT) != 0) { - return false; - } -#endif - } - return true; -} - -void IS31FL_unlock_register(uint8_t addr, uint8_t page) { - // unlock the command register and select Page to write - IS31FL_write_single_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, ISSI_REGISTER_UNLOCK); - IS31FL_write_single_register(addr, ISSI_COMMANDREGISTER, page); -} - -void IS31FL_common_init(uint8_t addr, uint8_t ssr) { - // Setup phase, need to take out of software shutdown and configure - // ISSI_SSR_x is passed to allow Master / Slave setting where applicable - - // Unlock the command register & select Function Register - IS31FL_unlock_register(addr, ISSI_PAGE_FUNCTION); - // Set Configuration Register to remove Software shutdown - IS31FL_write_single_register(addr, ISSI_REG_CONFIGURATION, ISSI_CONFIGURATION); - // Set Golbal Current Control Register - IS31FL_write_single_register(addr, ISSI_REG_GLOBALCURRENT, ISSI_GLOBALCURRENT); - // Set Pull up & Down for SWx CSy - IS31FL_write_single_register(addr, ISSI_REG_PULLDOWNUP, ISSI_PULLDOWNUP); -// Set Tempature Status -#ifdef ISSI_REG_TEMP - IS31FL_write_single_register(addr, ISSI_REG_TEMP, ISSI_TEMP); -#endif - // Set Spread Spectrum Register, passed through as sets SYNC function - IS31FL_write_single_register(addr, ISSI_REG_SSR, ssr); -// Set PWM Frequency Enable Register if applicable -#ifdef ISSI_REG_PWM_ENABLE - IS31FL_write_single_register(addr, ISSI_REG_PWM_ENABLE, ISSI_PWM_ENABLE); -#endif -// Set PWM Frequency Register if applicable -#ifdef ISSI_REG_PWM_SET - IS31FL_write_single_register(addr, ISSI_REG_PWM_SET, ISSI_PWM_SET); -#endif - - // Wait 10ms to ensure the device has woken up. - wait_ms(10); -} - -void IS31FL_common_update_pwm_register(uint8_t addr, uint8_t index) { - if (g_pwm_buffer_update_required[index]) { - // Queue up the correct page - IS31FL_unlock_register(addr, ISSI_PAGE_PWM); - // Hand off the update to IS31FL_write_multi_registers - IS31FL_write_multi_registers(addr, g_pwm_buffer[index], ISSI_MAX_LEDS, ISSI_PWM_TRF_SIZE, ISSI_PWM_REG_1ST); - // Update flags that pwm_buffer has been updated - g_pwm_buffer_update_required[index] = false; - } -} - -#ifdef ISSI_MANUAL_SCALING -void IS31FL_set_manual_scaling_buffer(void) { - is31_led led; - is31_led scale; - for (int i = 0; i < ISSI_MANUAL_SCALING; i++) { - memcpy_P(&scale, (&g_is31_scaling[i]), sizeof(scale)); - -# ifdef RGB_MATRIX_ENABLE - if (scale.driver >= 0 && scale.driver < RGB_MATRIX_LED_COUNT) { - memcpy_P(&led, (&g_is31_leds[scale.driver]), sizeof(led)); - - if (g_scaling_buffer[led.driver][led.r] = scale.r && g_scaling_buffer[led.driver][led.g] = scale.g && g_scaling_buffer[led.driver][led.b] = scale.b) { - return; - } - g_scaling_buffer[led.driver][led.r] = scale.r; - g_scaling_buffer[led.driver][led.g] = scale.g; - g_scaling_buffer[led.driver][led.b] = scale.b; -# elif defined(LED_MATRIX_ENABLE) - if (scale.driver >= 0 && scale.driver < LED_MATRIX_LED_COUNT) { - memcpy_P(&led, (&g_is31_leds[scale.driver]), sizeof(led)); - - if (g_scaling_buffer[led.driver][led.v] == scale.v) { - return; - } - g_scaling_buffer[led.driver][led.v] = scale.v; -# endif - g_scaling_buffer_update_required[led.driver] = true; - } - } -} -#endif - -void IS31FL_common_update_scaling_register(uint8_t addr, uint8_t index) { - if (g_scaling_buffer_update_required[index]) { - // Queue up the correct page - IS31FL_unlock_register(addr, ISSI_PAGE_SCALING); - // Hand off the update to IS31FL_write_multi_registers - IS31FL_write_multi_registers(addr, g_scaling_buffer[index], ISSI_SCALING_SIZE, ISSI_SCALING_TRF_SIZE, ISSI_SCL_REG_1ST); - // Update flags that scaling_buffer has been updated - g_scaling_buffer_update_required[index] = false; - } -} - -void IS31FL_common_flush(void) { - IS31FL_common_update_pwm_register(DRIVER_ADDR_1, 0); -#if defined(DRIVER_ADDR_2) - IS31FL_common_update_pwm_register(DRIVER_ADDR_2, 1); -# if defined(DRIVER_ADDR_3) - IS31FL_common_update_pwm_register(DRIVER_ADDR_3, 2); -# if defined(DRIVER_ADDR_4) - IS31FL_common_update_pwm_register(DRIVER_ADDR_4, 3); -# endif -# endif -#endif -} - -#ifdef RGB_MATRIX_ENABLE -void IS31FL_RGB_init_drivers(void) { - i2c_init(); - - IS31FL_common_init(DRIVER_ADDR_1, ISSI_SSR_1); -# if defined(DRIVER_ADDR_2) - IS31FL_common_init(DRIVER_ADDR_2, ISSI_SSR_2); -# if defined(DRIVER_ADDR_3) - IS31FL_common_init(DRIVER_ADDR_3, ISSI_SSR_3); -# if defined(DRIVER_ADDR_4) - IS31FL_common_init(DRIVER_ADDR_4, ISSI_SSR_4); -# endif -# endif -# endif - - for (int i = 0; i < RGB_MATRIX_LED_COUNT; i++) { - IS31FL_RGB_set_scaling_buffer(i, true, true, true); - } - - // This actually updates the LED drivers -# ifdef ISSI_MANUAL_SCALING - IS31FL_set_manual_scaling_buffer(); -# endif - - IS31FL_common_update_scaling_register(DRIVER_ADDR_1, 0); -# if defined(DRIVER_ADDR_2) - IS31FL_common_update_scaling_register(DRIVER_ADDR_2, 1); -# if defined(DRIVER_ADDR_3) - IS31FL_common_update_scaling_register(DRIVER_ADDR_3, 2); -# if defined(DRIVER_ADDR_4) - IS31FL_common_update_scaling_register(DRIVER_ADDR_4, 3); -# endif -# endif -# endif -} - -// Colour is set by adjusting PWM register -void IS31FL_RGB_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { - if (index >= 0 && index < RGB_MATRIX_LED_COUNT) { - is31_led led; - memcpy_P(&led, (&g_is31_leds[index]), sizeof(led)); - - g_pwm_buffer[led.driver][led.r] = red; - g_pwm_buffer[led.driver][led.g] = green; - g_pwm_buffer[led.driver][led.b] = blue; - g_pwm_buffer_update_required[led.driver] = true; - } -} - -void IS31FL_RGB_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { - for (int i = 0; i < RGB_MATRIX_LED_COUNT; i++) { - IS31FL_RGB_set_color(i, red, green, blue); - } -} - -// Setup Scaling register that decides the peak current of each LED -void IS31FL_RGB_set_scaling_buffer(uint8_t index, bool red, bool green, bool blue) { - is31_led led; - memcpy_P(&led, (&g_is31_leds[index]), sizeof(led)); - if (red) { - g_scaling_buffer[led.driver][led.r] = ISSI_SCAL_RED; - } else { - g_scaling_buffer[led.driver][led.r] = ISSI_SCAL_RED_OFF; - } - if (green) { - g_scaling_buffer[led.driver][led.g] = ISSI_SCAL_GREEN; - } else { - g_scaling_buffer[led.driver][led.g] = ISSI_SCAL_GREEN_OFF; - } - if (blue) { - g_scaling_buffer[led.driver][led.b] = ISSI_SCAL_BLUE; - } else { - g_scaling_buffer[led.driver][led.b] = ISSI_SCAL_BLUE_OFF; - } - g_scaling_buffer_update_required[led.driver] = true; -} - -#elif defined(LED_MATRIX_ENABLE) -// LED Matrix Specific scripts -void IS31FL_simple_init_drivers(void) { - i2c_init(); - - IS31FL_common_init(DRIVER_ADDR_1, ISSI_SSR_1); -# if defined(DRIVER_ADDR_2) - IS31FL_common_init(DRIVER_ADDR_2, ISSI_SSR_2); -# if defined(DRIVER_ADDR_3) - IS31FL_common_init(DRIVER_ADDR_3, ISSI_SSR_3); -# if defined(DRIVER_ADDR_4) - IS31FL_common_init(DRIVER_ADDR_4, ISSI_SSR_4); -# endif -# endif -# endif - - for (int i = 0; i < LED_MATRIX_LED_COUNT; i++) { - IS31FL_simple_set_scaling_buffer(i, true); - } - -// This actually updates the LED drivers -# ifdef ISSI_MANUAL_SCALING - IS31FL_set_manual_scaling_buffer(); -# endif - - IS31FL_common_update_scaling_register(DRIVER_ADDR_1, 0); -# if defined(DRIVER_ADDR_2) - IS31FL_common_update_scaling_register(DRIVER_ADDR_2, 1); -# if defined(DRIVER_ADDR_3) - IS31FL_common_update_scaling_register(DRIVER_ADDR_3, 2); -# if defined(DRIVER_ADDR_4) - IS31FL_common_update_scaling_register(DRIVER_ADDR_4, 3); -# endif -# endif -# endif -} - -void IS31FL_simple_set_scaling_buffer(uint8_t index, bool value) { - is31_led led; - memcpy_P(&led, (&g_is31_leds[index]), sizeof(led)); - if (value) { - g_scaling_buffer[led.driver][led.v] = ISSI_SCAL_LED; - } else { - g_scaling_buffer[led.driver][led.v] = ISSI_SCAL_LED_OFF; - } - g_scaling_buffer_update_required[led.driver] = true; -} - -void IS31FL_simple_set_brightness(int index, uint8_t value) { - if (index >= 0 && index < LED_MATRIX_LED_COUNT) { - is31_led led; - memcpy_P(&led, (&g_is31_leds[index]), sizeof(led)); - - g_pwm_buffer[led.driver][led.v] = value; - g_pwm_buffer_update_required[led.driver] = true; - } -} - -void IS31FL_simple_set_brigntness_all(uint8_t value) { - for (int i = 0; i < LED_MATRIX_LED_COUNT; i++) { - IS31FL_simple_set_brightness(i, value); - } -} -#endif diff --git a/drivers/led/issi/is31flcommon.h b/drivers/led/issi/is31flcommon.h deleted file mode 100644 index db7cd24b48d..00000000000 --- a/drivers/led/issi/is31flcommon.h +++ /dev/null @@ -1,84 +0,0 @@ -/* Copyright 2017 Jason Williams - * Copyright 2018 Jack Humbert - * Copyright 2018 Yiancar - * Copyright 2020 MelGeek - * Copyright 2021 MasterSpoon - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#include -#include -#include "progmem.h" -#include "util.h" - -#if defined DRIVER_ADDR_4 -# define DRIVER_COUNT 4 -#elif defined DRIVER_ADDR_3 -# define DRIVER_COUNT 3 -#elif defined DRIVER_ADDR_2 -# define DRIVER_COUNT 2 -#elif defined DRIVER_ADDR_1 -# define DRIVER_COUNT 1 -#endif - -#ifdef RGB_MATRIX_ENABLE -typedef struct is31_led { - uint8_t driver : 2; - uint8_t r; - uint8_t g; - uint8_t b; -} PACKED is31_led; - -extern const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT]; - -#elif defined(LED_MATRIX_ENABLE) -typedef struct is31_led { - uint8_t driver : 2; - uint8_t v; -} PACKED is31_led; - -extern const is31_led PROGMEM g_is31_leds[LED_MATRIX_LED_COUNT]; -#endif - -#ifdef ISSI_MANUAL_SCALING -extern const is31_led PROGMEM g_is31_scaling[]; -void IS31FL_set_manual_scaling_buffer(void); -#endif - -void IS31FL_write_single_register(uint8_t addr, uint8_t reg, uint8_t data); -bool IS31FL_write_multi_registers(uint8_t addr, uint8_t *source_buffer, uint8_t buffer_size, uint8_t transfer_size, uint8_t start_reg_addr); -void IS31FL_unlock_register(uint8_t addr, uint8_t page); -void IS31FL_common_init(uint8_t addr, uint8_t ssr); - -void IS31FL_common_update_pwm_register(uint8_t addr, uint8_t index); -void IS31FL_common_update_scaling_register(uint8_t addr, uint8_t index); - -void IS31FL_common_flush(void); - -#ifdef RGB_MATRIX_ENABLE -// RGB Matrix Specific scripts -void IS31FL_RGB_init_drivers(void); -void IS31FL_RGB_set_color(int index, uint8_t red, uint8_t green, uint8_t blue); -void IS31FL_RGB_set_color_all(uint8_t red, uint8_t green, uint8_t blue); -void IS31FL_RGB_set_scaling_buffer(uint8_t index, bool red, bool green, bool blue); -#elif defined(LED_MATRIX_ENABLE) -// LED Matrix Specific scripts -void IS31FL_simple_init_drivers(void); -void IS31FL_simple_set_scaling_buffer(uint8_t index, bool value); -void IS31FL_simple_set_brightness(int index, uint8_t value); -void IS31FL_simple_set_brigntness_all(uint8_t value); -#endif diff --git a/keyboards/akko/5087/config.h b/keyboards/akko/5087/config.h index a3245e36bf7..ceb98727385 100644 --- a/keyboards/akko/5087/config.h +++ b/keyboards/akko/5087/config.h @@ -35,8 +35,8 @@ #define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12 /* I2C Config for LED Driver */ -#define DRIVER_COUNT 2 -#define DRIVER_ADDR_1 0b1110100 -#define DRIVER_ADDR_2 0b1110111 +#define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_GND +#define SNLED27351_I2C_ADDRESS_2 SNLED27351_I2C_ADDRESS_VDDIO + #define I2C1_OPMODE OPMODE_I2C #define I2C1_CLOCK_SPEED 400000 /* 400000 */ diff --git a/keyboards/akko/5087/info.json b/keyboards/akko/5087/info.json index f5249029b30..67ea54c169b 100644 --- a/keyboards/akko/5087/info.json +++ b/keyboards/akko/5087/info.json @@ -40,7 +40,7 @@ "caps_lock": "A15" }, "rgb_matrix": { - "driver": "ckled2001", + "driver": "snled27351", "max_brightness": 180, "animations": { "breathing": true, diff --git a/keyboards/darkproject/kd83a_bfg_edition/config.h b/keyboards/darkproject/kd83a_bfg_edition/config.h index 0bc6f88ce16..0bfa9fde801 100644 --- a/keyboards/darkproject/kd83a_bfg_edition/config.h +++ b/keyboards/darkproject/kd83a_bfg_edition/config.h @@ -33,10 +33,10 @@ #define SPI_MOSI_PIN A7 #define SPI_MISO_PIN A6 -#define DRIVER_1_CS A15 -#define DRIVER_2_CS B15 -#define DRIVER_1_EN C13 -#define DRIVER_2_EN C13 +#define AW20216S_CS_PIN_1 A15 +#define AW20216S_CS_PIN_2 B15 +#define AW20216S_EN_PIN_1 C13 +#define AW20216S_EN_PIN_2 C13 #define DRIVER_COUNT 2 #define DRIVER_1_LED_TOTAL 66 diff --git a/keyboards/darkproject/kd83a_bfg_edition/info.json b/keyboards/darkproject/kd83a_bfg_edition/info.json index 5795c11cca3..3c0ce62c6c6 100644 --- a/keyboards/darkproject/kd83a_bfg_edition/info.json +++ b/keyboards/darkproject/kd83a_bfg_edition/info.json @@ -80,7 +80,7 @@ "solid_multisplash": true }, "center_point": [76, 25], - "driver": "aw20216", + "driver": "aw20216s", "layout": [ { "flags": 4, "matrix": [1, 3], "x": 0, "y": 0 }, { "flags": 4, "matrix": [2, 6], "x": 20, "y": 0 }, diff --git a/keyboards/darkproject/kd87a_bfg_edition/config.h b/keyboards/darkproject/kd87a_bfg_edition/config.h index a8173b53ddf..19344dd8d83 100644 --- a/keyboards/darkproject/kd87a_bfg_edition/config.h +++ b/keyboards/darkproject/kd87a_bfg_edition/config.h @@ -32,10 +32,10 @@ #define SPI_MOSI_PIN A7 #define SPI_MISO_PIN A6 -#define DRIVER_1_CS A15 -#define DRIVER_2_CS B15 -#define DRIVER_1_EN C13 -#define DRIVER_2_EN C13 +#define AW20216S_CS_PIN_1 A15 +#define AW20216S_CS_PIN_2 B15 +#define AW20216S_EN_PIN_1 C13 +#define AW20216S_EN_PIN_2 C13 #define DRIVER_1_LED_TOTAL 68 #define DRIVER_2_LED_TOTAL 54 diff --git a/keyboards/darkproject/kd87a_bfg_edition/info.json b/keyboards/darkproject/kd87a_bfg_edition/info.json index 94717c6baac..1d57b5c8109 100644 --- a/keyboards/darkproject/kd87a_bfg_edition/info.json +++ b/keyboards/darkproject/kd87a_bfg_edition/info.json @@ -79,7 +79,7 @@ "solid_multisplash": true }, "center_point": [87, 35], - "driver": "aw20216", + "driver": "aw20216s", "layout": [ { "flags": 4, "matrix": [1, 3], "x": 0, "y": 0 }, { "flags": 4, "matrix": [2, 6], "x": 20, "y": 0 }, diff --git a/keyboards/jukaie/jk01/config.h b/keyboards/jukaie/jk01/config.h index 0aaa2ef64c9..6db4bc473e9 100644 --- a/keyboards/jukaie/jk01/config.h +++ b/keyboards/jukaie/jk01/config.h @@ -32,10 +32,10 @@ #define SPI_MOSI_PIN A7 #define SPI_MISO_PIN A6 -#define DRIVER_1_CS A15 -#define DRIVER_2_CS B15 -#define DRIVER_1_EN C13 -#define DRIVER_2_EN C13 +#define AW20216S_CS_PIN_1 A15 +#define AW20216S_CS_PIN_2 B15 +#define AW20216S_EN_PIN_1 C13 +#define AW20216S_EN_PIN_2 C13 #define DRIVER_1_LED_TOTAL 66 #define DRIVER_2_LED_TOTAL 19 diff --git a/keyboards/jukaie/jk01/info.json b/keyboards/jukaie/jk01/info.json index c53a59a5a31..671e7b08a71 100644 --- a/keyboards/jukaie/jk01/info.json +++ b/keyboards/jukaie/jk01/info.json @@ -87,7 +87,7 @@ "solid_multisplash": true }, "center_point": [76, 25], - "driver": "aw20216", + "driver": "aw20216s", "layout": [ { "flags": 4, "matrix": [1, 3], "x": 0, "y": 0 }, { "flags": 4, "matrix": [2, 6], "x": 20, "y": 0 }, diff --git a/keyboards/kprepublic/cstc40/config.h b/keyboards/kprepublic/cstc40/config.h index 5e055746723..c26f20c74d1 100644 --- a/keyboards/kprepublic/cstc40/config.h +++ b/keyboards/kprepublic/cstc40/config.h @@ -5,7 +5,7 @@ #define I2C1_SDA_PIN B9 #define I2C1_SCL_PIN B8 -#define DRIVER_ADDR_1 0b1010000 +#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND #define RGB_MATRIX_LED_COUNT 47 #define RGB_MATRIX_FRAMEBUFFER_EFFECTS diff --git a/keyboards/orthograph/orthograph.c b/keyboards/orthograph/orthograph.c index 43db344bbc3..04d25829370 100644 --- a/keyboards/orthograph/orthograph.c +++ b/keyboards/orthograph/orthograph.c @@ -17,7 +17,7 @@ #include "quantum.h" #ifdef RGB_MATRIX_ENABLE -const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { +const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/phentech/rpk_001/config.h b/keyboards/phentech/rpk_001/config.h index ad95ed6f108..097edc2bf73 100644 --- a/keyboards/phentech/rpk_001/config.h +++ b/keyboards/phentech/rpk_001/config.h @@ -4,8 +4,8 @@ #pragma once /* RGB Config */ -#define DRIVER_1_CS B6 -#define DRIVER_1_EN B7 +#define AW20216S_CS_PIN_1 B6 +#define AW20216S_EN_PIN_1 B7 #define RGB_MATRIX_LED_COUNT 67 /* SPI Config */ diff --git a/keyboards/phentech/rpk_001/info.json b/keyboards/phentech/rpk_001/info.json index d047c36456a..fee1f538068 100644 --- a/keyboards/phentech/rpk_001/info.json +++ b/keyboards/phentech/rpk_001/info.json @@ -42,7 +42,7 @@ "on_state": 0 }, "rgb_matrix": { - "driver": "aw20216", + "driver": "aw20216s", "animations": { "solid_color": true, "alphas_mods": true, diff --git a/keyboards/projectd/75/ansi/config.h b/keyboards/projectd/75/ansi/config.h index 250abf17249..6446fec445b 100644 --- a/keyboards/projectd/75/ansi/config.h +++ b/keyboards/projectd/75/ansi/config.h @@ -32,10 +32,10 @@ #define SPI_MOSI_PIN A7 #define SPI_MISO_PIN A6 -#define DRIVER_1_CS A15 -#define DRIVER_2_CS B15 -#define DRIVER_1_EN C13 -#define DRIVER_2_EN C13 +#define AW20216S_CS_PIN_1 A15 +#define AW20216S_CS_PIN_2 B15 +#define AW20216S_EN_PIN_1 C13 +#define AW20216S_EN_PIN_2 C13 #define DRIVER_1_LED_TOTAL 70 #define DRIVER_2_LED_TOTAL 17 diff --git a/keyboards/projectd/75/ansi/info.json b/keyboards/projectd/75/ansi/info.json index 0e137de614b..b34f092b097 100644 --- a/keyboards/projectd/75/ansi/info.json +++ b/keyboards/projectd/75/ansi/info.json @@ -81,7 +81,7 @@ "solid_multisplash": true }, "center_point": [78, 20], - "driver": "aw20216", + "driver": "aw20216s", "layout": [ { "flags": 4, "matrix": [1, 3], "x": 0, "y": 0 }, { "flags": 4, "matrix": [2, 6], "x": 12.5, "y": 0 }, diff --git a/keyboards/qwertykeys/qk100/ansi/config.h b/keyboards/qwertykeys/qk100/ansi/config.h index c210fdf1eb0..a80816345c3 100644 --- a/keyboards/qwertykeys/qk100/ansi/config.h +++ b/keyboards/qwertykeys/qk100/ansi/config.h @@ -38,5 +38,5 @@ along with this program. If not, see . # define RGB_MATRIX_LED_PROCESS_LIMIT 4 # define RGB_MATRIX_LED_FLUSH_LIMIT 26 # define RGB_MATRIX_STARTUP_VAL 128 -# define DRIVER_ADDR_1 0b0110000 +# define IS31FL3741_I2C_ADDRESS_1 IS31FL3741_I2C_ADDRESS_GND # define RGB_MATRIX_LED_COUNT 101 \ No newline at end of file diff --git a/quantum/led_matrix/led_matrix_drivers.c b/quantum/led_matrix/led_matrix_drivers.c index 73e2513a110..b866383481e 100644 --- a/quantum/led_matrix/led_matrix_drivers.c +++ b/quantum/led_matrix/led_matrix_drivers.c @@ -105,14 +105,6 @@ const led_matrix_driver_t led_matrix_driver = { .set_value_all = is31fl3746a_set_value_all, }; -#elif defined(IS31FLCOMMON) -const led_matrix_driver_t led_matrix_driver = { - .init = IS31FL_simple_init_drivers, - .flush = IS31FL_common_flush, - .set_value = IS31FL_simple_set_brightness, - .set_value_all = IS31FL_simple_set_brigntness_all, -}; - #elif defined(LED_MATRIX_SNLED27351) const led_matrix_driver_t led_matrix_driver = { .init = snled27351_init_drivers, diff --git a/quantum/led_matrix/led_matrix_drivers.h b/quantum/led_matrix/led_matrix_drivers.h index 4eab0ac748d..79d3cebeadc 100644 --- a/quantum/led_matrix/led_matrix_drivers.h +++ b/quantum/led_matrix/led_matrix_drivers.h @@ -25,8 +25,6 @@ # include "is31fl3745-simple.h" #elif defined(LED_MATRIX_IS31FL3746A) # include "is31fl3746a-simple.h" -#elif defined(IS31FLCOMMON) -# include "is31flcommon.h" #elif defined(LED_MATRIX_SNLED27351) # include "snled27351-simple.h" #endif diff --git a/quantum/rgb_matrix/rgb_matrix_drivers.c b/quantum/rgb_matrix/rgb_matrix_drivers.c index e3dd9beff71..b5e539657d5 100644 --- a/quantum/rgb_matrix/rgb_matrix_drivers.c +++ b/quantum/rgb_matrix/rgb_matrix_drivers.c @@ -108,14 +108,6 @@ const rgb_matrix_driver_t rgb_matrix_driver = { .set_color_all = is31fl3746a_set_color_all, }; -#elif defined(IS31FLCOMMON) -const rgb_matrix_driver_t rgb_matrix_driver = { - .init = IS31FL_RGB_init_drivers, - .flush = IS31FL_common_flush, - .set_color = IS31FL_RGB_set_color, - .set_color_all = IS31FL_RGB_set_color_all, -}; - #elif defined(RGB_MATRIX_SNLED27351) const rgb_matrix_driver_t rgb_matrix_driver = { .init = snled27351_init_drivers, diff --git a/quantum/rgb_matrix/rgb_matrix_drivers.h b/quantum/rgb_matrix/rgb_matrix_drivers.h index 07d376dfd7f..8f919b1b3c7 100644 --- a/quantum/rgb_matrix/rgb_matrix_drivers.h +++ b/quantum/rgb_matrix/rgb_matrix_drivers.h @@ -27,8 +27,6 @@ # include "is31fl3745.h" #elif defined(RGB_MATRIX_IS31FL3746A) # include "is31fl3746a.h" -#elif defined(IS31FLCOMMON) -# include "is31flcommon.h" #elif defined(RGB_MATRIX_SNLED27351) # include "snled27351.h" #elif defined(RGB_MATRIX_WS2812)