From 8136eda6d48c8bc8dda5dfa439f7324d55448ca2 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 13 Sep 2023 22:53:15 +1000 Subject: [PATCH] is31fl3731: driver naming cleanups (#21918) --- docs/feature_led_matrix.md | 8 +- docs/feature_rgb_matrix.md | 10 +- drivers/led/issi/is31fl3731-simple.c | 97 ++++++++++--------- drivers/led/issi/is31fl3731-simple.h | 16 ++- drivers/led/issi/is31fl3731.c | 83 ++++++++-------- drivers/led/issi/is31fl3731.h | 16 ++- keyboards/aeboards/satellite/rev1/config.h | 2 +- keyboards/clueboard/66_hotswap/gen1/config.h | 2 +- keyboards/dp60/config.h | 2 +- keyboards/dztech/dz65rgb/v1/config.h | 2 +- keyboards/dztech/dz65rgb/v2/config.h | 2 +- keyboards/ergodox_ez/config.h | 2 +- keyboards/fallacy/config.h | 2 +- keyboards/ferris/0_2/bling/config.h | 2 +- keyboards/geekboards/tester/config.h | 2 +- keyboards/gizmo_engineering/gk6/config.h | 2 +- keyboards/handwired/orbweaver/config.h | 2 +- keyboards/hs60/v1/config.h | 2 +- keyboards/inett_studio/sqx/hotswap/config.h | 2 +- keyboards/inett_studio/sqx/universal/config.h | 2 +- .../input_club/ergodox_infinity/config.h | 2 +- keyboards/input_club/whitefox/config.h | 2 +- keyboards/kbdfans/kbd67/mkiirgb/v1/config.h | 2 +- keyboards/kbdfans/kbd67/mkiirgb/v2/config.h | 2 +- keyboards/kbdfans/maja/config.h | 2 +- keyboards/latincompass/latin17rgb/config.h | 2 +- keyboards/latincompass/latin6rgb/config.h | 2 +- keyboards/matrix/m20add/config.h | 2 +- keyboards/matrix/noah/config.h | 2 +- .../mechlovin/adelais/rgb_led/rev2/config.h | 2 +- keyboards/mechlovin/delphine/rgb_led/config.h | 2 +- keyboards/mechlovin/hannah60rgb/rev2/config.h | 2 +- keyboards/mechlovin/olly/octagon/config.h | 2 +- keyboards/mechlovin/zed65/mono_led/config.h | 2 +- keyboards/moonlander/config.h | 2 +- keyboards/neson_design/700e/config.h | 2 +- keyboards/neson_design/n6/config.h | 2 +- keyboards/opendeck/32/rev1/config.h | 2 +- keyboards/planck/light/config.h | 2 +- keyboards/smallkeyboard/config.h | 2 +- keyboards/spaceholdings/nebula12/config.h | 2 +- keyboards/terrazzo/config.h | 2 +- keyboards/tkc/portico/config.h | 4 +- keyboards/wilba_tech/rama_works_kara/config.h | 2 +- keyboards/wilba_tech/rama_works_koyu/config.h | 2 +- .../wilba_tech/rama_works_m10_c/config.h | 2 +- .../wilba_tech/rama_works_m50_a/config.h | 2 +- .../wilba_tech/rama_works_m60_a/config.h | 2 +- .../wilba_tech/rama_works_m65_b/config.h | 2 +- .../wilba_tech/rama_works_m65_bx/config.h | 2 +- .../wilba_tech/rama_works_u80_a/config.h | 2 +- keyboards/wilba_tech/wt60_b/config.h | 2 +- keyboards/wilba_tech/wt60_bx/config.h | 2 +- keyboards/wilba_tech/wt60_c/config.h | 2 +- keyboards/wilba_tech/zeal60/config.h | 2 +- keyboards/wilba_tech/zeal65/config.h | 2 +- keyboards/xbows/knight/config.h | 2 +- keyboards/xbows/knight_plus/config.h | 2 +- keyboards/xbows/nature/config.h | 2 +- keyboards/xbows/numpad/config.h | 2 +- keyboards/xbows/ranger/config.h | 2 +- keyboards/xbows/woody/config.h | 2 +- keyboards/xelus/dawn60/rev1/config.h | 2 +- keyboards/xelus/dawn60/rev1_qmk/config.h | 2 +- 64 files changed, 189 insertions(+), 159 deletions(-) diff --git a/docs/feature_led_matrix.md b/docs/feature_led_matrix.md index fd56a45725..b22d4ad3a3 100644 --- a/docs/feature_led_matrix.md +++ b/docs/feature_led_matrix.md @@ -19,9 +19,9 @@ You can use between 1 and 4 IS31FL3731 IC's. Do not specify `LED_DRIVER_ADDR_ | Variable | Description | Default | |----------|-------------|---------| -| `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 | -| `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 | -| `LED_DRIVER_COUNT` | (Required) How many LED driver IC's are present | | +| `IS31FL3731_I2C_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 | +| `IS31FL3731_I2C_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 | +| `IS31FL3731_DRIVER_COUNT` | (Required) How many LED driver IC's are present | | | `LED_MATRIX_LED_COUNT` | (Required) How many LED lights are present across all drivers | | | `LED_DRIVER_ADDR_1` | (Required) Address for the first LED driver | | | `LED_DRIVER_ADDR_2` | (Optional) Address for the second LED driver | | @@ -41,7 +41,7 @@ Here is an example using 2 drivers. #define LED_DRIVER_ADDR_1 0b1110100 #define LED_DRIVER_ADDR_2 0b1110110 -#define LED_DRIVER_COUNT 2 +#define IS31FL3731_DRIVER_COUNT 2 #define LED_DRIVER_1_LED_TOTAL 25 #define LED_DRIVER_2_LED_TOTAL 24 #define LED_MATRIX_LED_COUNT (LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL) diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md index af548f37fe..a8f4f346d6 100644 --- a/docs/feature_rgb_matrix.md +++ b/docs/feature_rgb_matrix.md @@ -19,10 +19,10 @@ You can use between 1 and 4 IS31FL3731 IC's. Do not specify `DRIVER_ADDR_` de | Variable | Description | Default | |----------|-------------|---------| -| `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 | -| `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 | -| `ISSI_3731_DEGHOST` | (Optional) Set this define to enable de-ghosting by halving Vcc during blanking time | | -| `DRIVER_COUNT` | (Required) How many RGB driver IC's are present | | +| `IS31FL3731_I2C_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 | +| `IS31FL3731_I2C_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 | +| `IS31FL3731_DEGHOST` | (Optional) Set this define to enable de-ghosting by halving Vcc during blanking time | | +| `IS31FL3731_DRIVER_COUNT` | (Required) How many RGB driver IC's are present | | | `RGB_MATRIX_LED_COUNT` | (Required) How many RGB lights are present across all drivers | | | `DRIVER_ADDR_1` | (Required) Address for the first RGB driver | | | `DRIVER_ADDR_2` | (Optional) Address for the second RGB driver | | @@ -42,7 +42,7 @@ Here is an example using 2 drivers. #define DRIVER_ADDR_1 0b1110100 #define DRIVER_ADDR_2 0b1110110 -#define DRIVER_COUNT 2 +#define IS31FL3731_DRIVER_COUNT 2 #define DRIVER_1_LED_TOTAL 25 #define DRIVER_2_LED_TOTAL 24 #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) diff --git a/drivers/led/issi/is31fl3731-simple.c b/drivers/led/issi/is31fl3731-simple.c index f7f6980a3b..6b463d3092 100644 --- a/drivers/led/issi/is31fl3731-simple.c +++ b/drivers/led/issi/is31fl3731-simple.c @@ -18,6 +18,7 @@ */ #include "is31fl3731-simple.h" +#include #include "i2c_master.h" #include "wait.h" @@ -28,34 +29,34 @@ // 0b1110111 AD <-> VCC // 0b1110101 AD <-> SCL // 0b1110110 AD <-> SDA -#define ISSI_ADDR_DEFAULT 0x74 +#define IS31FL3731_I2C_ADDRESS_DEFAULT 0x74 -#define ISSI_REG_CONFIG 0x00 -#define ISSI_REG_CONFIG_PICTUREMODE 0x00 -#define ISSI_REG_CONFIG_AUTOPLAYMODE 0x08 -#define ISSI_REG_CONFIG_AUDIOPLAYMODE 0x18 +#define IS31FL3731_REG_CONFIG 0x00 +#define IS31FL3731_REG_CONFIG_PICTUREMODE 0x00 +#define IS31FL3731_REG_CONFIG_AUTOPLAYMODE 0x08 +#define IS31FL3731_REG_CONFIG_AUDIOPLAYMODE 0x18 -#define ISSI_CONF_PICTUREMODE 0x00 -#define ISSI_CONF_AUTOFRAMEMODE 0x04 -#define ISSI_CONF_AUDIOMODE 0x08 +#define IS31FL3731_CONF_PICTUREMODE 0x00 +#define IS31FL3731_CONF_AUTOFRAMEMODE 0x04 +#define IS31FL3731_CONF_AUDIOMODE 0x08 -#define ISSI_REG_PICTUREFRAME 0x01 +#define IS31FL3731_REG_PICTUREFRAME 0x01 // Not defined in the datasheet -- See AN for IC -#define ISSI_REG_GHOST_IMAGE_PREVENTION 0xC2 // Set bit 4 to enable de-ghosting +#define IS31FL3731_REG_GHOST_IMAGE_PREVENTION 0xC2 // Set bit 4 to enable de-ghosting -#define ISSI_REG_SHUTDOWN 0x0A -#define ISSI_REG_AUDIOSYNC 0x06 +#define IS31FL3731_REG_SHUTDOWN 0x0A +#define IS31FL3731_REG_AUDIOSYNC 0x06 -#define ISSI_COMMANDREGISTER 0xFD -#define ISSI_BANK_FUNCTIONREG 0x0B // helpfully called 'page nine' +#define IS31FL3731_COMMANDREGISTER 0xFD +#define IS31FL3731_BANK_FUNCTIONREG 0x0B // helpfully called 'page nine' -#ifndef ISSI_TIMEOUT -# define ISSI_TIMEOUT 100 +#ifndef IS31FL3731_I2C_TIMEOUT +# define IS31FL3731_I2C_TIMEOUT 100 #endif -#ifndef ISSI_PERSISTENCE -# define ISSI_PERSISTENCE 0 +#ifndef IS31FL3731_I2C_PERSISTENCE +# define IS31FL3731_I2C_PERSISTENCE 0 #endif // Transfer buffer for TWITransmitData() @@ -66,20 +67,20 @@ uint8_t g_twi_transfer_buffer[20]; // We could optimize this and take out the unused registers from these // buffers and the transfers in is31fl3731_write_pwm_buffer() but it's // probably not worth the extra complexity. -uint8_t g_pwm_buffer[LED_DRIVER_COUNT][144]; -bool g_pwm_buffer_update_required[LED_DRIVER_COUNT] = {false}; +uint8_t g_pwm_buffer[IS31FL3731_DRIVER_COUNT][144]; +bool g_pwm_buffer_update_required[IS31FL3731_DRIVER_COUNT] = {false}; /* There's probably a better way to init this... */ -#if LED_DRIVER_COUNT == 1 -uint8_t g_led_control_registers[LED_DRIVER_COUNT][18] = {{0}}; -#elif LED_DRIVER_COUNT == 2 -uint8_t g_led_control_registers[LED_DRIVER_COUNT][18] = {{0}, {0}}; -#elif LED_DRIVER_COUNT == 3 -uint8_t g_led_control_registers[LED_DRIVER_COUNT][18] = {{0}, {0}, {0}}; -#elif LED_DRIVER_COUNT == 4 -uint8_t g_led_control_registers[LED_DRIVER_COUNT][18] = {{0}, {0}, {0}, {0}}; +#if IS31FL3731_DRIVER_COUNT == 1 +uint8_t g_led_control_registers[IS31FL3731_DRIVER_COUNT][18] = {{0}}; +#elif IS31FL3731_DRIVER_COUNT == 2 +uint8_t g_led_control_registers[IS31FL3731_DRIVER_COUNT][18] = {{0}, {0}}; +#elif IS31FL3731_DRIVER_COUNT == 3 +uint8_t g_led_control_registers[IS31FL3731_DRIVER_COUNT][18] = {{0}, {0}, {0}}; +#elif IS31FL3731_DRIVER_COUNT == 4 +uint8_t g_led_control_registers[IS31FL3731_DRIVER_COUNT][18] = {{0}, {0}, {0}, {0}}; #endif -bool g_led_control_registers_update_required[LED_DRIVER_COUNT] = {false}; +bool g_led_control_registers_update_required[IS31FL3731_DRIVER_COUNT] = {false}; // This is the bit pattern in the LED control registers // (for matrix A, add one to register for matrix B) @@ -99,14 +100,14 @@ void is31fl3731_write_register(uint8_t addr, uint8_t reg, uint8_t data) { g_twi_transfer_buffer[0] = reg; g_twi_transfer_buffer[1] = data; -#if ISSI_PERSISTENCE > 0 - for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) { - if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) == 0) { +#if IS31FL3731_I2C_PERSISTENCE > 0 + for (uint8_t i = 0; i < IS31FL3731_I2C_PERSISTENCE; i++) { + if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3731_I2C_TIMEOUT) == 0) { break; } } #else - i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT); + i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3731_I2C_TIMEOUT); #endif } @@ -125,12 +126,12 @@ void is31fl3731_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) { // thus this sets registers 0x24-0x33, 0x34-0x43, etc. in one transfer memcpy(g_twi_transfer_buffer + 1, pwm_buffer + i, 16); -#if ISSI_PERSISTENCE > 0 - for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) { - if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) == 0) break; +#if IS31FL3731_I2C_PERSISTENCE > 0 + for (uint8_t i = 0; i < IS31FL3731_I2C_PERSISTENCE; i++) { + if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, IS31FL3731_I2C_TIMEOUT) == 0) break; } #else - i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT); + i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, IS31FL3731_I2C_TIMEOUT); #endif } } @@ -142,26 +143,26 @@ void is31fl3731_init(uint8_t addr) { // then disable software shutdown. // select "function register" bank - is31fl3731_write_register(addr, ISSI_COMMANDREGISTER, ISSI_BANK_FUNCTIONREG); + is31fl3731_write_register(addr, IS31FL3731_COMMANDREGISTER, IS31FL3731_BANK_FUNCTIONREG); // enable software shutdown - is31fl3731_write_register(addr, ISSI_REG_SHUTDOWN, 0x00); -#ifdef ISSI_3731_DEGHOST // set to enable de-ghosting of the array - is31fl3731_write_register(addr, ISSI_REG_GHOST_IMAGE_PREVENTION, 0x10); + is31fl3731_write_register(addr, IS31FL3731_REG_SHUTDOWN, 0x00); +#ifdef IS31FL3731_DEGHOST // set to enable de-ghosting of the array + is31fl3731_write_register(addr, IS31FL3731_REG_GHOST_IMAGE_PREVENTION, 0x10); #endif // this delay was copied from other drivers, might not be needed wait_ms(10); // picture mode - is31fl3731_write_register(addr, ISSI_REG_CONFIG, ISSI_REG_CONFIG_PICTUREMODE); + is31fl3731_write_register(addr, IS31FL3731_REG_CONFIG, IS31FL3731_REG_CONFIG_PICTUREMODE); // display frame 0 - is31fl3731_write_register(addr, ISSI_REG_PICTUREFRAME, 0x00); + is31fl3731_write_register(addr, IS31FL3731_REG_PICTUREFRAME, 0x00); // audio sync off - is31fl3731_write_register(addr, ISSI_REG_AUDIOSYNC, 0x00); + is31fl3731_write_register(addr, IS31FL3731_REG_AUDIOSYNC, 0x00); // select bank 0 - is31fl3731_write_register(addr, ISSI_COMMANDREGISTER, 0); + is31fl3731_write_register(addr, IS31FL3731_COMMANDREGISTER, 0); // turn off all LEDs in the LED control register for (int i = 0x00; i <= 0x11; i++) { @@ -179,15 +180,15 @@ void is31fl3731_init(uint8_t addr) { } // select "function register" bank - is31fl3731_write_register(addr, ISSI_COMMANDREGISTER, ISSI_BANK_FUNCTIONREG); + is31fl3731_write_register(addr, IS31FL3731_COMMANDREGISTER, IS31FL3731_BANK_FUNCTIONREG); // disable software shutdown - is31fl3731_write_register(addr, ISSI_REG_SHUTDOWN, 0x01); + is31fl3731_write_register(addr, IS31FL3731_REG_SHUTDOWN, 0x01); // select bank 0 and leave it selected. // most usage after initialization is just writing PWM buffers in bank 0 // as there's not much point in double-buffering - is31fl3731_write_register(addr, ISSI_COMMANDREGISTER, 0); + is31fl3731_write_register(addr, IS31FL3731_COMMANDREGISTER, 0); } void is31fl3731_set_value(int index, uint8_t value) { diff --git a/drivers/led/issi/is31fl3731-simple.h b/drivers/led/issi/is31fl3731-simple.h index 69fba14a0b..ee830faca8 100644 --- a/drivers/led/issi/is31fl3731-simple.h +++ b/drivers/led/issi/is31fl3731-simple.h @@ -20,9 +20,23 @@ #include #include -#include #include "progmem.h" +// ======== DEPRECATED DEFINES - DO NOT USE ======== +#ifdef LED_DRIVER_COUNT +# define IS31FL3731_DRIVER_COUNT LED_DRIVER_COUNT +#endif +#ifdef ISSI_TIMEOUT +# define IS31FL3731_I2C_TIMEOUT ISSI_TIMEOUT +#endif +#ifdef ISSI_PERSISTENCE +# define IS31FL3731_I2C_PERSISTENCE ISSI_PERSISTENCE +#endif +#ifdef ISSI_3731_DEGHOST +# define IS31FL3731_DEGHOST ISSI_3731_DEGHOST +#endif +// ======== + typedef struct is31_led { uint8_t driver : 2; uint8_t v; diff --git a/drivers/led/issi/is31fl3731.c b/drivers/led/issi/is31fl3731.c index 15a01b6d75..9e2d39c692 100644 --- a/drivers/led/issi/is31fl3731.c +++ b/drivers/led/issi/is31fl3731.c @@ -17,6 +17,7 @@ */ #include "is31fl3731.h" +#include #include "i2c_master.h" #include "wait.h" @@ -27,34 +28,34 @@ // 0b1110111 AD <-> VCC // 0b1110101 AD <-> SCL // 0b1110110 AD <-> SDA -#define ISSI_ADDR_DEFAULT 0x74 +#define IS31FL3731_I2C_ADDRESS_DEFAULT 0x74 -#define ISSI_REG_CONFIG 0x00 -#define ISSI_REG_CONFIG_PICTUREMODE 0x00 -#define ISSI_REG_CONFIG_AUTOPLAYMODE 0x08 -#define ISSI_REG_CONFIG_AUDIOPLAYMODE 0x18 +#define IS31FL3731_REG_CONFIG 0x00 +#define IS31FL3731_REG_CONFIG_PICTUREMODE 0x00 +#define IS31FL3731_REG_CONFIG_AUTOPLAYMODE 0x08 +#define IS31FL3731_REG_CONFIG_AUDIOPLAYMODE 0x18 -#define ISSI_CONF_PICTUREMODE 0x00 -#define ISSI_CONF_AUTOFRAMEMODE 0x04 -#define ISSI_CONF_AUDIOMODE 0x08 +#define IS31FL3731_CONF_PICTUREMODE 0x00 +#define IS31FL3731_CONF_AUTOFRAMEMODE 0x04 +#define IS31FL3731_CONF_AUDIOMODE 0x08 -#define ISSI_REG_PICTUREFRAME 0x01 +#define IS31FL3731_REG_PICTUREFRAME 0x01 // Not defined in the datasheet -- See AN for IC -#define ISSI_REG_GHOST_IMAGE_PREVENTION 0xC2 // Set bit 4 to enable de-ghosting +#define IS31FL3731_REG_GHOST_IMAGE_PREVENTION 0xC2 // Set bit 4 to enable de-ghosting -#define ISSI_REG_SHUTDOWN 0x0A -#define ISSI_REG_AUDIOSYNC 0x06 +#define IS31FL3731_REG_SHUTDOWN 0x0A +#define IS31FL3731_REG_AUDIOSYNC 0x06 -#define ISSI_COMMANDREGISTER 0xFD -#define ISSI_BANK_FUNCTIONREG 0x0B // helpfully called 'page nine' +#define IS31FL3731_COMMANDREGISTER 0xFD +#define IS31FL3731_BANK_FUNCTIONREG 0x0B // helpfully called 'page nine' -#ifndef ISSI_TIMEOUT -# define ISSI_TIMEOUT 100 +#ifndef IS31FL3731_I2C_TIMEOUT +# define IS31FL3731_I2C_TIMEOUT 100 #endif -#ifndef ISSI_PERSISTENCE -# define ISSI_PERSISTENCE 0 +#ifndef IS31FL3731_I2C_PERSISTENCE +# define IS31FL3731_I2C_PERSISTENCE 0 #endif // Transfer buffer for TWITransmitData() @@ -65,11 +66,11 @@ uint8_t g_twi_transfer_buffer[20]; // We could optimize this and take out the unused registers from these // buffers and the transfers in is31fl3731_write_pwm_buffer() but it's // probably not worth the extra complexity. -uint8_t g_pwm_buffer[DRIVER_COUNT][144]; -bool g_pwm_buffer_update_required[DRIVER_COUNT] = {false}; +uint8_t g_pwm_buffer[IS31FL3731_DRIVER_COUNT][144]; +bool g_pwm_buffer_update_required[IS31FL3731_DRIVER_COUNT] = {false}; -uint8_t g_led_control_registers[DRIVER_COUNT][18] = {{0}}; -bool g_led_control_registers_update_required[DRIVER_COUNT] = {false}; +uint8_t g_led_control_registers[IS31FL3731_DRIVER_COUNT][18] = {{0}}; +bool g_led_control_registers_update_required[IS31FL3731_DRIVER_COUNT] = {false}; // This is the bit pattern in the LED control registers // (for matrix A, add one to register for matrix B) @@ -89,12 +90,12 @@ void is31fl3731_write_register(uint8_t addr, uint8_t reg, uint8_t data) { g_twi_transfer_buffer[0] = reg; g_twi_transfer_buffer[1] = data; -#if ISSI_PERSISTENCE > 0 - for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) { - if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) == 0) break; +#if IS31FL3731_I2C_PERSISTENCE > 0 + for (uint8_t i = 0; i < IS31FL3731_I2C_PERSISTENCE; i++) { + if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3731_I2C_TIMEOUT) == 0) break; } #else - i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT); + i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3731_I2C_TIMEOUT); #endif } @@ -113,12 +114,12 @@ void is31fl3731_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) { // thus this sets registers 0x24-0x33, 0x34-0x43, etc. in one transfer memcpy(g_twi_transfer_buffer + 1, pwm_buffer + i, 16); -#if ISSI_PERSISTENCE > 0 - for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) { - if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) == 0) break; +#if IS31FL3731_I2C_PERSISTENCE > 0 + for (uint8_t i = 0; i < IS31FL3731_I2C_PERSISTENCE; i++) { + if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, IS31FL3731_I2C_TIMEOUT) == 0) break; } #else - i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT); + i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, IS31FL3731_I2C_TIMEOUT); #endif } } @@ -130,26 +131,26 @@ void is31fl3731_init(uint8_t addr) { // then disable software shutdown. // select "function register" bank - is31fl3731_write_register(addr, ISSI_COMMANDREGISTER, ISSI_BANK_FUNCTIONREG); + is31fl3731_write_register(addr, IS31FL3731_COMMANDREGISTER, IS31FL3731_BANK_FUNCTIONREG); // enable software shutdown - is31fl3731_write_register(addr, ISSI_REG_SHUTDOWN, 0x00); -#ifdef ISSI_3731_DEGHOST // set to enable de-ghosting of the array - is31fl3731_write_register(addr, ISSI_REG_GHOST_IMAGE_PREVENTION, 0x10); + is31fl3731_write_register(addr, IS31FL3731_REG_SHUTDOWN, 0x00); +#ifdef IS31FL3731_DEGHOST // set to enable de-ghosting of the array + is31fl3731_write_register(addr, IS31FL3731_REG_GHOST_IMAGE_PREVENTION, 0x10); #endif // this delay was copied from other drivers, might not be needed wait_ms(10); // picture mode - is31fl3731_write_register(addr, ISSI_REG_CONFIG, ISSI_REG_CONFIG_PICTUREMODE); + is31fl3731_write_register(addr, IS31FL3731_REG_CONFIG, IS31FL3731_REG_CONFIG_PICTUREMODE); // display frame 0 - is31fl3731_write_register(addr, ISSI_REG_PICTUREFRAME, 0x00); + is31fl3731_write_register(addr, IS31FL3731_REG_PICTUREFRAME, 0x00); // audio sync off - is31fl3731_write_register(addr, ISSI_REG_AUDIOSYNC, 0x00); + is31fl3731_write_register(addr, IS31FL3731_REG_AUDIOSYNC, 0x00); // select bank 0 - is31fl3731_write_register(addr, ISSI_COMMANDREGISTER, 0); + is31fl3731_write_register(addr, IS31FL3731_COMMANDREGISTER, 0); // turn off all LEDs in the LED control register for (int i = 0x00; i <= 0x11; i++) { @@ -167,15 +168,15 @@ void is31fl3731_init(uint8_t addr) { } // select "function register" bank - is31fl3731_write_register(addr, ISSI_COMMANDREGISTER, ISSI_BANK_FUNCTIONREG); + is31fl3731_write_register(addr, IS31FL3731_COMMANDREGISTER, IS31FL3731_BANK_FUNCTIONREG); // disable software shutdown - is31fl3731_write_register(addr, ISSI_REG_SHUTDOWN, 0x01); + is31fl3731_write_register(addr, IS31FL3731_REG_SHUTDOWN, 0x01); // select bank 0 and leave it selected. // most usage after initialization is just writing PWM buffers in bank 0 // as there's not much point in double-buffering - is31fl3731_write_register(addr, ISSI_COMMANDREGISTER, 0); + is31fl3731_write_register(addr, IS31FL3731_COMMANDREGISTER, 0); } void is31fl3731_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { diff --git a/drivers/led/issi/is31fl3731.h b/drivers/led/issi/is31fl3731.h index bdf03de1ee..97e3f454df 100644 --- a/drivers/led/issi/is31fl3731.h +++ b/drivers/led/issi/is31fl3731.h @@ -19,9 +19,23 @@ #include #include -#include #include "progmem.h" +// ======== DEPRECATED DEFINES - DO NOT USE ======== +#ifdef DRIVER_COUNT +# define IS31FL3731_DRIVER_COUNT DRIVER_COUNT +#endif +#ifdef ISSI_TIMEOUT +# define IS31FL3731_I2C_TIMEOUT ISSI_TIMEOUT +#endif +#ifdef ISSI_PERSISTENCE +# define IS31FL3731_I2C_PERSISTENCE ISSI_PERSISTENCE +#endif +#ifdef ISSI_3731_DEGHOST +# define IS31FL3731_DEGHOST ISSI_3731_DEGHOST +#endif +// ======== + typedef struct is31_led { uint8_t driver : 2; uint8_t r; diff --git a/keyboards/aeboards/satellite/rev1/config.h b/keyboards/aeboards/satellite/rev1/config.h index 508689faf5..915b9f4b49 100644 --- a/keyboards/aeboards/satellite/rev1/config.h +++ b/keyboards/aeboards/satellite/rev1/config.h @@ -20,7 +20,7 @@ #define DRIVER_ADDR_1 0x74 #define DRIVER_ADDR_2 0x76 -#define DRIVER_COUNT 2 +#define IS31FL3731_DRIVER_COUNT 2 #define DRIVER_1_LED_TOTAL 36 #define DRIVER_2_LED_TOTAL 36 #define ISSI_DRIVER_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) diff --git a/keyboards/clueboard/66_hotswap/gen1/config.h b/keyboards/clueboard/66_hotswap/gen1/config.h index b50b676713..5d3af942ad 100644 --- a/keyboards/clueboard/66_hotswap/gen1/config.h +++ b/keyboards/clueboard/66_hotswap/gen1/config.h @@ -44,7 +44,7 @@ #define I2C1_SCL_PIN B8 #define I2C1_SDA_PIN B9 -#define LED_DRIVER_COUNT 1 +#define IS31FL3731_DRIVER_COUNT 1 #define LED_MATRIX_LED_COUNT 71 // LED Matrix Animation modes. Explicitly enabled diff --git a/keyboards/dp60/config.h b/keyboards/dp60/config.h index fd83fe2d68..857e03df80 100644 --- a/keyboards/dp60/config.h +++ b/keyboards/dp60/config.h @@ -35,7 +35,7 @@ //rgb matrix setting #define DRIVER_ADDR_1 0b1110100 #define DRIVER_ADDR_2 0b1110111 -#define DRIVER_COUNT 2 +#define IS31FL3731_DRIVER_COUNT 2 #define DRIVER_1_LED_TOTAL 36 #define DRIVER_2_LED_TOTAL 36 #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) diff --git a/keyboards/dztech/dz65rgb/v1/config.h b/keyboards/dztech/dz65rgb/v1/config.h index 4a84498975..79c1473f23 100644 --- a/keyboards/dztech/dz65rgb/v1/config.h +++ b/keyboards/dztech/dz65rgb/v1/config.h @@ -72,7 +72,7 @@ # define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL # define DRIVER_ADDR_1 0b1110100 # define DRIVER_ADDR_2 0b1110111 -# define DRIVER_COUNT 2 +# define IS31FL3731_DRIVER_COUNT 2 # define DRIVER_1_LED_TOTAL 35 # define DRIVER_2_LED_TOTAL 33 # define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) diff --git a/keyboards/dztech/dz65rgb/v2/config.h b/keyboards/dztech/dz65rgb/v2/config.h index 04700c84ed..187e661bdb 100644 --- a/keyboards/dztech/dz65rgb/v2/config.h +++ b/keyboards/dztech/dz65rgb/v2/config.h @@ -72,7 +72,7 @@ # define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL # define DRIVER_ADDR_1 0b1110100 # define DRIVER_ADDR_2 0b1110111 -# define DRIVER_COUNT 2 +# define IS31FL3731_DRIVER_COUNT 2 # define DRIVER_1_LED_TOTAL 35 # define DRIVER_2_LED_TOTAL 33 # define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) diff --git a/keyboards/ergodox_ez/config.h b/keyboards/ergodox_ez/config.h index de850a0548..3741b72a67 100644 --- a/keyboards/ergodox_ez/config.h +++ b/keyboards/ergodox_ez/config.h @@ -93,7 +93,7 @@ along with this program. If not, see . // RGB backlight #define DRIVER_ADDR_1 0b1110100 #define DRIVER_ADDR_2 0b1110111 -#define DRIVER_COUNT 2 +#define IS31FL3731_DRIVER_COUNT 2 #define DRIVER_1_LED_TOTAL 24 #define DRIVER_2_LED_TOTAL 24 #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) diff --git a/keyboards/fallacy/config.h b/keyboards/fallacy/config.h index 21231c7c57..dc66968bdc 100755 --- a/keyboards/fallacy/config.h +++ b/keyboards/fallacy/config.h @@ -19,7 +19,7 @@ * Using the default defines here, but using a custom implementation */ #define LED_DRIVER_ADDR_1 0b1110100 -#define LED_DRIVER_COUNT 1 +#define IS31FL3731_DRIVER_COUNT 1 #define LED_MATRIX_LED_COUNT 3 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap diff --git a/keyboards/ferris/0_2/bling/config.h b/keyboards/ferris/0_2/bling/config.h index cbb3b11c90..9d8e9786f1 100644 --- a/keyboards/ferris/0_2/bling/config.h +++ b/keyboards/ferris/0_2/bling/config.h @@ -20,7 +20,7 @@ along with this program. If not, see . /* LED Drivers */ #define DRIVER_ADDR_1 0b1110100 #define DRIVER_ADDR_2 0b1110101 -#define DRIVER_COUNT 2 +#define IS31FL3731_DRIVER_COUNT 2 #define DRIVER_1_LED_TOTAL 7 #define DRIVER_2_LED_TOTAL 7 #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) diff --git a/keyboards/geekboards/tester/config.h b/keyboards/geekboards/tester/config.h index 0fea806b6f..0e7b8a1737 100644 --- a/keyboards/geekboards/tester/config.h +++ b/keyboards/geekboards/tester/config.h @@ -57,7 +57,7 @@ # define DRIVER_ADDR_1 0b1110100 # define DRIVER_ADDR_2 0b1110101 -# define DRIVER_COUNT 2 +# define IS31FL3731_DRIVER_COUNT 2 # define DRIVER_1_LED_TOTAL 8 # define DRIVER_2_LED_TOTAL 0 # define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) diff --git a/keyboards/gizmo_engineering/gk6/config.h b/keyboards/gizmo_engineering/gk6/config.h index ba683e4fed..aabc293922 100755 --- a/keyboards/gizmo_engineering/gk6/config.h +++ b/keyboards/gizmo_engineering/gk6/config.h @@ -21,7 +21,7 @@ along with this program. If not, see . #define DRIVER_ADDR_1 0b1110100 #define DRIVER_ADDR_2 0b1110111 -#define DRIVER_COUNT 2 +#define IS31FL3731_DRIVER_COUNT 2 #define DRIVER_1_LED_TOTAL 32 #define DRIVER_2_LED_TOTAL 32 #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) diff --git a/keyboards/handwired/orbweaver/config.h b/keyboards/handwired/orbweaver/config.h index ab7cb9d9d5..e0594697a1 100644 --- a/keyboards/handwired/orbweaver/config.h +++ b/keyboards/handwired/orbweaver/config.h @@ -17,7 +17,7 @@ #pragma once -#define DRIVER_COUNT 1 +#define IS31FL3731_DRIVER_COUNT 1 #define DRIVER_ADDR_1 0b1110100 #define RGB_MATRIX_LED_COUNT 20 #define I2C1_CLOCK_SPEED 100000 diff --git a/keyboards/hs60/v1/config.h b/keyboards/hs60/v1/config.h index 62c800b9bc..d9e94b2a14 100644 --- a/keyboards/hs60/v1/config.h +++ b/keyboards/hs60/v1/config.h @@ -44,7 +44,7 @@ along with this program. If not, see . #define DRIVER_ADDR_1 0b1110100 #define DRIVER_ADDR_2 0b1110101 -#define DRIVER_COUNT 2 +#define IS31FL3731_DRIVER_COUNT 2 #define DRIVER_1_LED_TOTAL 30 #ifdef HS60_ANSI diff --git a/keyboards/inett_studio/sqx/hotswap/config.h b/keyboards/inett_studio/sqx/hotswap/config.h index f698867ffb..c11317afc8 100644 --- a/keyboards/inett_studio/sqx/hotswap/config.h +++ b/keyboards/inett_studio/sqx/hotswap/config.h @@ -34,7 +34,7 @@ #define DRIVER_2_LED_TOTAL 31 #define DRIVER_ADDR_1 0b1110100 #define DRIVER_ADDR_2 0b1110111 -#define DRIVER_COUNT 2 +#define IS31FL3731_DRIVER_COUNT 2 #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) #if defined(RGB_MATRIX_ENABLE) && defined(RGBLIGHT_ENABLE) diff --git a/keyboards/inett_studio/sqx/universal/config.h b/keyboards/inett_studio/sqx/universal/config.h index 30903b5803..772c8db16b 100644 --- a/keyboards/inett_studio/sqx/universal/config.h +++ b/keyboards/inett_studio/sqx/universal/config.h @@ -34,7 +34,7 @@ #define DRIVER_2_LED_TOTAL 36 #define DRIVER_ADDR_1 0b1110100 #define DRIVER_ADDR_2 0b1110111 -#define DRIVER_COUNT 2 +#define IS31FL3731_DRIVER_COUNT 2 #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) #if defined(RGB_MATRIX_ENABLE) && defined(RGBLIGHT_ENABLE) diff --git a/keyboards/input_club/ergodox_infinity/config.h b/keyboards/input_club/ergodox_infinity/config.h index 7db6119a1c..17baf0013e 100644 --- a/keyboards/input_club/ergodox_infinity/config.h +++ b/keyboards/input_club/ergodox_infinity/config.h @@ -44,7 +44,7 @@ along with this program. If not, see . /* LED matrix driver */ #define LED_DRIVER_ADDR_1 0x74 -#define LED_DRIVER_COUNT 1 +#define IS31FL3731_DRIVER_COUNT 1 #define LED_MATRIX_LED_COUNT 76 #define LED_MATRIX_SPLIT { 38, 38 } #define LED_DISABLE_WHEN_USB_SUSPENDED diff --git a/keyboards/input_club/whitefox/config.h b/keyboards/input_club/whitefox/config.h index 067b7f4e59..bf8d3d6c9c 100644 --- a/keyboards/input_club/whitefox/config.h +++ b/keyboards/input_club/whitefox/config.h @@ -22,7 +22,7 @@ along with this program. If not, see . /* LED matrix driver */ #define LED_DRIVER_ADDR_1 0x74 -#define LED_DRIVER_COUNT 1 +#define IS31FL3731_DRIVER_COUNT 1 #define LED_MATRIX_LED_COUNT 71 #define LED_DISABLE_WHEN_USB_SUSPENDED diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v1/config.h b/keyboards/kbdfans/kbd67/mkiirgb/v1/config.h index f2ee16dac2..cae6b8bf92 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/v1/config.h +++ b/keyboards/kbdfans/kbd67/mkiirgb/v1/config.h @@ -57,7 +57,7 @@ #define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL #define DRIVER_ADDR_1 0b1110100 #define DRIVER_ADDR_2 0b1110111 -#define DRIVER_COUNT 2 +#define IS31FL3731_DRIVER_COUNT 2 #define DRIVER_1_LED_TOTAL 35 #define DRIVER_2_LED_TOTAL 32 #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v2/config.h b/keyboards/kbdfans/kbd67/mkiirgb/v2/config.h index cf7f488280..c55b0c7f1f 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/v2/config.h +++ b/keyboards/kbdfans/kbd67/mkiirgb/v2/config.h @@ -57,7 +57,7 @@ # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 # define DRIVER_ADDR_1 0b1110100 # define DRIVER_ADDR_2 0b1110111 -# define DRIVER_COUNT 2 +# define IS31FL3731_DRIVER_COUNT 2 # define DRIVER_1_LED_TOTAL 35 # define DRIVER_2_LED_TOTAL 32 # define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) diff --git a/keyboards/kbdfans/maja/config.h b/keyboards/kbdfans/maja/config.h index 8f15d2619f..e2a27f01b1 100755 --- a/keyboards/kbdfans/maja/config.h +++ b/keyboards/kbdfans/maja/config.h @@ -56,7 +56,7 @@ #define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL #define DRIVER_ADDR_1 0b1110100 #define DRIVER_ADDR_2 0b1110110 -#define DRIVER_COUNT 2 +#define IS31FL3731_DRIVER_COUNT 2 #define DRIVER_1_LED_TOTAL 36 #define DRIVER_2_LED_TOTAL 31 #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) diff --git a/keyboards/latincompass/latin17rgb/config.h b/keyboards/latincompass/latin17rgb/config.h index 7908e4ceca..f858709eae 100644 --- a/keyboards/latincompass/latin17rgb/config.h +++ b/keyboards/latincompass/latin17rgb/config.h @@ -79,7 +79,7 @@ # define DRIVER_ADDR_1 0b1110100 # define DRIVER_ADDR_2 0b1110110 -# define DRIVER_COUNT 2 +# define IS31FL3731_DRIVER_COUNT 2 # define DRIVER_1_LED_TOTAL 25 # define DRIVER_2_LED_TOTAL 24 # define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) diff --git a/keyboards/latincompass/latin6rgb/config.h b/keyboards/latincompass/latin6rgb/config.h index 1a6518c897..5cfafd6bec 100644 --- a/keyboards/latincompass/latin6rgb/config.h +++ b/keyboards/latincompass/latin6rgb/config.h @@ -79,7 +79,7 @@ // 0b1110110 AD <-> SDA #define DRIVER_ADDR_1 0b1110100 -#define DRIVER_COUNT 1 +#define IS31FL3731_DRIVER_COUNT 1 #define RGB_MATRIX_LED_COUNT 6 #endif diff --git a/keyboards/matrix/m20add/config.h b/keyboards/matrix/m20add/config.h index 8d4c69bb9c..2ae5017487 100644 --- a/keyboards/matrix/m20add/config.h +++ b/keyboards/matrix/m20add/config.h @@ -79,5 +79,5 @@ #define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 #define DRIVER_ADDR_1 0b1110100 -#define DRIVER_COUNT 1 +#define IS31FL3731_DRIVER_COUNT 1 #define RGB_MATRIX_LED_COUNT 20 diff --git a/keyboards/matrix/noah/config.h b/keyboards/matrix/noah/config.h index 452fef4cee..38859b1292 100644 --- a/keyboards/matrix/noah/config.h +++ b/keyboards/matrix/noah/config.h @@ -21,7 +21,7 @@ // rgb matrix setting #define DRIVER_ADDR_1 0b1110100 #define DRIVER_ADDR_2 0b1110110 -#define DRIVER_COUNT 2 +#define IS31FL3731_DRIVER_COUNT 2 #define DRIVER_1_LED_TOTAL 36 #define DRIVER_2_LED_TOTAL 36 #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) diff --git a/keyboards/mechlovin/adelais/rgb_led/rev2/config.h b/keyboards/mechlovin/adelais/rgb_led/rev2/config.h index d4b34ff48e..4c7bc3a1da 100644 --- a/keyboards/mechlovin/adelais/rgb_led/rev2/config.h +++ b/keyboards/mechlovin/adelais/rgb_led/rev2/config.h @@ -10,7 +10,7 @@ // 0b1110110 AD <-> SDA #define DRIVER_ADDR_1 0b1110100 #define DRIVER_ADDR_2 0b1110110 -#define DRIVER_COUNT 2 +#define IS31FL3731_DRIVER_COUNT 2 #define DRIVER_1_LED_TOTAL 32 #define DRIVER_2_LED_TOTAL 36 #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) diff --git a/keyboards/mechlovin/delphine/rgb_led/config.h b/keyboards/mechlovin/delphine/rgb_led/config.h index 9498e8914f..048bed9e03 100644 --- a/keyboards/mechlovin/delphine/rgb_led/config.h +++ b/keyboards/mechlovin/delphine/rgb_led/config.h @@ -8,7 +8,7 @@ // 0b1110101 AD <-> SCL // 0b1110110 AD <-> SDA #define DRIVER_ADDR_1 0b1110110 -#define DRIVER_COUNT 1 +#define IS31FL3731_DRIVER_COUNT 1 #define RGB_MATRIX_LED_COUNT 25 #define RGB_MATRIX_KEYPRESSES // reacts to keypresses #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) diff --git a/keyboards/mechlovin/hannah60rgb/rev2/config.h b/keyboards/mechlovin/hannah60rgb/rev2/config.h index 7e9a918493..4e4eb7f7bd 100644 --- a/keyboards/mechlovin/hannah60rgb/rev2/config.h +++ b/keyboards/mechlovin/hannah60rgb/rev2/config.h @@ -9,7 +9,7 @@ // 0b1110110 AD <-> SDA #define DRIVER_ADDR_1 0b1110100 #define DRIVER_ADDR_2 0b1110110 -#define DRIVER_COUNT 2 +#define IS31FL3731_DRIVER_COUNT 2 #define DRIVER_1_LED_TOTAL 44 #define DRIVER_2_LED_TOTAL 34 #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) diff --git a/keyboards/mechlovin/olly/octagon/config.h b/keyboards/mechlovin/olly/octagon/config.h index 4e502b6154..a59c651bd7 100644 --- a/keyboards/mechlovin/olly/octagon/config.h +++ b/keyboards/mechlovin/olly/octagon/config.h @@ -29,7 +29,7 @@ along with this program. If not, see . #define I2C_DRIVER I2CD2 #define I2C1_SCL_PIN B10 #define I2C1_SDA_PIN B11 -#define LED_DRIVER_COUNT 1 +#define IS31FL3731_DRIVER_COUNT 1 #define LED_MATRIX_LED_COUNT 94 #define LED_MATRIX_KEYPRESSES // reacts to keypresses #define LED_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) diff --git a/keyboards/mechlovin/zed65/mono_led/config.h b/keyboards/mechlovin/zed65/mono_led/config.h index 1ec1746456..d6a8e9cd02 100644 --- a/keyboards/mechlovin/zed65/mono_led/config.h +++ b/keyboards/mechlovin/zed65/mono_led/config.h @@ -29,7 +29,7 @@ along with this program. If not, see . #define I2C_DRIVER I2CD2 #define I2C1_SCL_PIN B10 #define I2C1_SDA_PIN B11 -#define LED_DRIVER_COUNT 1 +#define IS31FL3731_DRIVER_COUNT 1 #define LED_MATRIX_LED_COUNT 70 #define LED_MATRIX_KEYPRESSES // reacts to keypresses #define LED_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) diff --git a/keyboards/moonlander/config.h b/keyboards/moonlander/config.h index 389f97d696..6b2377db1a 100644 --- a/keyboards/moonlander/config.h +++ b/keyboards/moonlander/config.h @@ -68,7 +68,7 @@ #define DRIVER_ADDR_1 0b1110100 #define DRIVER_ADDR_2 0b1110111 -#define DRIVER_COUNT 2 +#define IS31FL3731_DRIVER_COUNT 2 #define DRIVER_1_LED_TOTAL 36 #define DRIVER_2_LED_TOTAL 36 #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) diff --git a/keyboards/neson_design/700e/config.h b/keyboards/neson_design/700e/config.h index cf89616aa8..ea666617e0 100644 --- a/keyboards/neson_design/700e/config.h +++ b/keyboards/neson_design/700e/config.h @@ -34,7 +34,7 @@ #define DRIVER_2_LED_TOTAL 32 #define DRIVER_ADDR_1 0b1110100 #define DRIVER_ADDR_2 0b1110111 -#define DRIVER_COUNT 2 +#define IS31FL3731_DRIVER_COUNT 2 #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL+DRIVER_2_LED_TOTAL) #define USB_SUSPEND_WAKEUP_DELAY 1000 diff --git a/keyboards/neson_design/n6/config.h b/keyboards/neson_design/n6/config.h index 91d96c6a4d..dfdb5b93aa 100644 --- a/keyboards/neson_design/n6/config.h +++ b/keyboards/neson_design/n6/config.h @@ -34,5 +34,5 @@ #define DRIVER_2_LED_TOTAL 32 #define DRIVER_ADDR_1 0b1110100 #define DRIVER_ADDR_2 0b1110111 -#define DRIVER_COUNT 2 +#define IS31FL3731_DRIVER_COUNT 2 #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL+DRIVER_2_LED_TOTAL) diff --git a/keyboards/opendeck/32/rev1/config.h b/keyboards/opendeck/32/rev1/config.h index a85a3db8b9..41b6e2d0b6 100644 --- a/keyboards/opendeck/32/rev1/config.h +++ b/keyboards/opendeck/32/rev1/config.h @@ -17,7 +17,7 @@ // RGB matrix #define DRIVER_ADDR_1 0b1110100 -#define DRIVER_COUNT 1 +#define IS31FL3731_DRIVER_COUNT 1 #define RGB_MATRIX_LED_COUNT (4 * 8 * 3) #define RGB_DISABLE_WHEN_USB_SUSPENDED #define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_SPIRAL diff --git a/keyboards/planck/light/config.h b/keyboards/planck/light/config.h index d4001dd80b..827028cd3a 100644 --- a/keyboards/planck/light/config.h +++ b/keyboards/planck/light/config.h @@ -17,7 +17,7 @@ #define DRIVER_ADDR_1 0b1110100 #define DRIVER_ADDR_2 0b1110110 -#define DRIVER_COUNT 2 +#define IS31FL3731_DRIVER_COUNT 2 #define DRIVER_1_LED_TOTAL 25 #define DRIVER_2_LED_TOTAL 24 #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) diff --git a/keyboards/smallkeyboard/config.h b/keyboards/smallkeyboard/config.h index 4bee1c3663..cc454fe82e 100644 --- a/keyboards/smallkeyboard/config.h +++ b/keyboards/smallkeyboard/config.h @@ -75,6 +75,6 @@ // 0b1110110 AD <-> SDA #define DRIVER_ADDR_1 0b1110100 -#define DRIVER_COUNT 1 +#define IS31FL3731_DRIVER_COUNT 1 #define RGB_MATRIX_LED_COUNT 6 #endif diff --git a/keyboards/spaceholdings/nebula12/config.h b/keyboards/spaceholdings/nebula12/config.h index 3853ebcff6..ceeed9e1a7 100755 --- a/keyboards/spaceholdings/nebula12/config.h +++ b/keyboards/spaceholdings/nebula12/config.h @@ -73,7 +73,7 @@ along with this program. If not, see . #define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } #define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } -#define DRIVER_COUNT 1 +#define IS31FL3731_DRIVER_COUNT 1 #define RGB_MATRIX_LED_COUNT 16 // These define which keys in the matrix are alphas/mods diff --git a/keyboards/terrazzo/config.h b/keyboards/terrazzo/config.h index 0c7a09033d..dc0fa100e8 100644 --- a/keyboards/terrazzo/config.h +++ b/keyboards/terrazzo/config.h @@ -18,7 +18,7 @@ #ifdef LED_MATRIX_ENABLE #define LED_DRIVER_ADDR_1 0x74 -#define LED_DRIVER_COUNT 1 +#define IS31FL3731_DRIVER_COUNT 1 #define LED_MATRIX_LED_COUNT 105 #define LED_MATRIX_ROWS 15 #define LED_MATRIX_COLS 7 diff --git a/keyboards/tkc/portico/config.h b/keyboards/tkc/portico/config.h index c9a25e843c..5adf42127e 100644 --- a/keyboards/tkc/portico/config.h +++ b/keyboards/tkc/portico/config.h @@ -41,14 +41,14 @@ along with this program. If not, see . # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 # define DRIVER_ADDR_1 0x74 # define DRIVER_ADDR_2 0x77 -# define DRIVER_COUNT 2 +# define IS31FL3731_DRIVER_COUNT 2 # define DRIVER_1_LED_TOTAL 36 # define DRIVER_2_LED_TOTAL 31 # define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) #else // IS31FL3731 driver -#define DRIVER_COUNT 2 +#define IS31FL3731_DRIVER_COUNT 2 #define RGB_MATRIX_LED_COUNT 67 #define RGB_BACKLIGHT_ENABLED 1 diff --git a/keyboards/wilba_tech/rama_works_kara/config.h b/keyboards/wilba_tech/rama_works_kara/config.h index d34fd6468c..b3fa3808ec 100644 --- a/keyboards/wilba_tech/rama_works_kara/config.h +++ b/keyboards/wilba_tech/rama_works_kara/config.h @@ -16,7 +16,7 @@ #pragma once // IS31FL3731 driver -#define DRIVER_COUNT 2 +#define IS31FL3731_DRIVER_COUNT 2 #define RGB_MATRIX_LED_COUNT 72 // Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap diff --git a/keyboards/wilba_tech/rama_works_koyu/config.h b/keyboards/wilba_tech/rama_works_koyu/config.h index c3bb43ec6d..85bbf28051 100644 --- a/keyboards/wilba_tech/rama_works_koyu/config.h +++ b/keyboards/wilba_tech/rama_works_koyu/config.h @@ -16,7 +16,7 @@ #pragma once // IS31FL3731 driver -#define DRIVER_COUNT 2 +#define IS31FL3731_DRIVER_COUNT 2 #define RGB_MATRIX_LED_COUNT 72 // Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap diff --git a/keyboards/wilba_tech/rama_works_m10_c/config.h b/keyboards/wilba_tech/rama_works_m10_c/config.h index 1cc9655b1b..d5e47ac879 100644 --- a/keyboards/wilba_tech/rama_works_m10_c/config.h +++ b/keyboards/wilba_tech/rama_works_m10_c/config.h @@ -21,7 +21,7 @@ #define LOCKING_RESYNC_ENABLE // IS31FL3731 driver -#define DRIVER_COUNT 1 +#define IS31FL3731_DRIVER_COUNT 1 #define RGB_MATRIX_LED_COUNT 12 // Enable WT RGB backlight diff --git a/keyboards/wilba_tech/rama_works_m50_a/config.h b/keyboards/wilba_tech/rama_works_m50_a/config.h index ab04ab070b..16439309be 100644 --- a/keyboards/wilba_tech/rama_works_m50_a/config.h +++ b/keyboards/wilba_tech/rama_works_m50_a/config.h @@ -21,7 +21,7 @@ #define LOCKING_RESYNC_ENABLE // IS31FL3731 driver -#define DRIVER_COUNT 2 +#define IS31FL3731_DRIVER_COUNT 2 #define RGB_MATRIX_LED_COUNT 72 // Enable WT RGB backlight diff --git a/keyboards/wilba_tech/rama_works_m60_a/config.h b/keyboards/wilba_tech/rama_works_m60_a/config.h index c80a018496..7cec5dcc21 100644 --- a/keyboards/wilba_tech/rama_works_m60_a/config.h +++ b/keyboards/wilba_tech/rama_works_m60_a/config.h @@ -16,7 +16,7 @@ #pragma once // IS31FL3731 driver -#define DRIVER_COUNT 2 +#define IS31FL3731_DRIVER_COUNT 2 #define RGB_MATRIX_LED_COUNT 72 // Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap diff --git a/keyboards/wilba_tech/rama_works_m65_b/config.h b/keyboards/wilba_tech/rama_works_m65_b/config.h index 6d3f0fb97f..88f8341aa6 100644 --- a/keyboards/wilba_tech/rama_works_m65_b/config.h +++ b/keyboards/wilba_tech/rama_works_m65_b/config.h @@ -21,7 +21,7 @@ #define LOCKING_RESYNC_ENABLE // IS31FL3731 driver -#define DRIVER_COUNT 2 +#define IS31FL3731_DRIVER_COUNT 2 #define RGB_MATRIX_LED_COUNT 72 // Enable WT RGB backlight diff --git a/keyboards/wilba_tech/rama_works_m65_bx/config.h b/keyboards/wilba_tech/rama_works_m65_bx/config.h index e367a7fc76..be3af2f668 100644 --- a/keyboards/wilba_tech/rama_works_m65_bx/config.h +++ b/keyboards/wilba_tech/rama_works_m65_bx/config.h @@ -21,7 +21,7 @@ #define LOCKING_RESYNC_ENABLE // IS31FL3731 driver -#define DRIVER_COUNT 2 +#define IS31FL3731_DRIVER_COUNT 2 #define RGB_MATRIX_LED_COUNT 72 // Enable WT RGB backlight diff --git a/keyboards/wilba_tech/rama_works_u80_a/config.h b/keyboards/wilba_tech/rama_works_u80_a/config.h index cb2d88bd47..0d8e1e12b5 100644 --- a/keyboards/wilba_tech/rama_works_u80_a/config.h +++ b/keyboards/wilba_tech/rama_works_u80_a/config.h @@ -38,7 +38,7 @@ //#define NO_ACTION_ONESHOT // IS31FL3731 driver -#define DRIVER_COUNT 3 +#define IS31FL3731_DRIVER_COUNT 3 #define RGB_MATRIX_LED_COUNT 108 #define RGB_BACKLIGHT_ENABLED 1 diff --git a/keyboards/wilba_tech/wt60_b/config.h b/keyboards/wilba_tech/wt60_b/config.h index cf495a2e78..c5818173ca 100644 --- a/keyboards/wilba_tech/wt60_b/config.h +++ b/keyboards/wilba_tech/wt60_b/config.h @@ -23,7 +23,7 @@ // IS31FL3731 driver -#define DRIVER_COUNT 2 +#define IS31FL3731_DRIVER_COUNT 2 #define RGB_MATRIX_LED_COUNT 72 #define RGB_BACKLIGHT_ENABLED 1 diff --git a/keyboards/wilba_tech/wt60_bx/config.h b/keyboards/wilba_tech/wt60_bx/config.h index 6f89b14954..37ffe646bc 100644 --- a/keyboards/wilba_tech/wt60_bx/config.h +++ b/keyboards/wilba_tech/wt60_bx/config.h @@ -23,7 +23,7 @@ // IS31FL3731 driver -#define DRIVER_COUNT 2 +#define IS31FL3731_DRIVER_COUNT 2 #define RGB_MATRIX_LED_COUNT 72 #define RGB_BACKLIGHT_ENABLED 1 diff --git a/keyboards/wilba_tech/wt60_c/config.h b/keyboards/wilba_tech/wt60_c/config.h index 776aebcf20..80f894e451 100644 --- a/keyboards/wilba_tech/wt60_c/config.h +++ b/keyboards/wilba_tech/wt60_c/config.h @@ -23,7 +23,7 @@ // IS31FL3731 driver -#define DRIVER_COUNT 2 +#define IS31FL3731_DRIVER_COUNT 2 #define RGB_MATRIX_LED_COUNT 72 #define RGB_BACKLIGHT_ENABLED 1 diff --git a/keyboards/wilba_tech/zeal60/config.h b/keyboards/wilba_tech/zeal60/config.h index e57bafe20d..31ee2942ce 100644 --- a/keyboards/wilba_tech/zeal60/config.h +++ b/keyboards/wilba_tech/zeal60/config.h @@ -16,7 +16,7 @@ #pragma once // IS31FL3731 driver -#define DRIVER_COUNT 2 +#define IS31FL3731_DRIVER_COUNT 2 #define RGB_MATRIX_LED_COUNT 72 // Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap diff --git a/keyboards/wilba_tech/zeal65/config.h b/keyboards/wilba_tech/zeal65/config.h index 4a73ed3b27..7370931df1 100644 --- a/keyboards/wilba_tech/zeal65/config.h +++ b/keyboards/wilba_tech/zeal65/config.h @@ -16,7 +16,7 @@ #pragma once // IS31FL3731 driver -#define DRIVER_COUNT 2 +#define IS31FL3731_DRIVER_COUNT 2 #define RGB_MATRIX_LED_COUNT 72 // Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap diff --git a/keyboards/xbows/knight/config.h b/keyboards/xbows/knight/config.h index 0875283a78..dcf3c5a52f 100644 --- a/keyboards/xbows/knight/config.h +++ b/keyboards/xbows/knight/config.h @@ -50,7 +50,7 @@ # define DRIVER_ADDR_1 0b1110100 # define DRIVER_ADDR_2 0b1110110 # define DRIVER_ADDR_3 0b1110101 -# define DRIVER_COUNT 3 +# define IS31FL3731_DRIVER_COUNT 3 # define DRIVER_1_LED_TOTAL 36 # define DRIVER_2_LED_TOTAL 35 # define DRIVER_3_LED_TOTAL 15 diff --git a/keyboards/xbows/knight_plus/config.h b/keyboards/xbows/knight_plus/config.h index f8ec6d273b..417393d4f8 100644 --- a/keyboards/xbows/knight_plus/config.h +++ b/keyboards/xbows/knight_plus/config.h @@ -50,7 +50,7 @@ # define DRIVER_ADDR_1 0b1110100 # define DRIVER_ADDR_2 0b1110110 # define DRIVER_ADDR_3 0b1110101 -# define DRIVER_COUNT 3 +# define IS31FL3731_DRIVER_COUNT 3 # define DRIVER_1_LED_TOTAL 36 # define DRIVER_2_LED_TOTAL 35 # define DRIVER_3_LED_TOTAL 15 diff --git a/keyboards/xbows/nature/config.h b/keyboards/xbows/nature/config.h index be7fbeaa64..e3db6b5b7a 100644 --- a/keyboards/xbows/nature/config.h +++ b/keyboards/xbows/nature/config.h @@ -52,7 +52,7 @@ # define DRIVER_ADDR_1 0b1110100 # define DRIVER_ADDR_2 0b1110110 # define DRIVER_ADDR_3 0b1110101 -# define DRIVER_COUNT 3 +# define IS31FL3731_DRIVER_COUNT 3 # define DRIVER_1_LED_TOTAL 36 # define DRIVER_2_LED_TOTAL 36 # define DRIVER_3_LED_TOTAL 15 diff --git a/keyboards/xbows/numpad/config.h b/keyboards/xbows/numpad/config.h index 1276efe191..ec0b7d8e8b 100644 --- a/keyboards/xbows/numpad/config.h +++ b/keyboards/xbows/numpad/config.h @@ -48,6 +48,6 @@ # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out # define DRIVER_ADDR_1 0b1110111 -# define DRIVER_COUNT 1 +# define IS31FL3731_DRIVER_COUNT 1 # define RGB_MATRIX_LED_COUNT 22 #endif diff --git a/keyboards/xbows/ranger/config.h b/keyboards/xbows/ranger/config.h index 68c8227da0..2ae5db6289 100644 --- a/keyboards/xbows/ranger/config.h +++ b/keyboards/xbows/ranger/config.h @@ -49,7 +49,7 @@ # define DRIVER_ADDR_1 0b1110100 # define DRIVER_ADDR_2 0b1110101 # define DRIVER_ADDR_3 0b1110110 -# define DRIVER_COUNT 3 +# define IS31FL3731_DRIVER_COUNT 3 # define DRIVER_1_LED_TOTAL 36 # define DRIVER_2_LED_TOTAL 36 # define DRIVER_3_LED_TOTAL 15 diff --git a/keyboards/xbows/woody/config.h b/keyboards/xbows/woody/config.h index bfdbcce8c2..0228b954d7 100644 --- a/keyboards/xbows/woody/config.h +++ b/keyboards/xbows/woody/config.h @@ -58,7 +58,7 @@ # define DRIVER_ADDR_1 0b1110100 # define DRIVER_ADDR_2 0b1110110 -# define DRIVER_COUNT 2 +# define IS31FL3731_DRIVER_COUNT 2 # define DRIVER_1_LED_TOTAL 35 # define DRIVER_2_LED_TOTAL 32 # define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) diff --git a/keyboards/xelus/dawn60/rev1/config.h b/keyboards/xelus/dawn60/rev1/config.h index d3b505447a..b895890388 100644 --- a/keyboards/xelus/dawn60/rev1/config.h +++ b/keyboards/xelus/dawn60/rev1/config.h @@ -16,7 +16,7 @@ #pragma once // IS31FL3731 driver -#define DRIVER_COUNT 2 +#define IS31FL3731_DRIVER_COUNT 2 #define RGB_MATRIX_LED_COUNT 64 // Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap diff --git a/keyboards/xelus/dawn60/rev1_qmk/config.h b/keyboards/xelus/dawn60/rev1_qmk/config.h index ad399bd962..0c3f8208a4 100644 --- a/keyboards/xelus/dawn60/rev1_qmk/config.h +++ b/keyboards/xelus/dawn60/rev1_qmk/config.h @@ -27,7 +27,7 @@ #define DRIVER_ADDR_1 0x74 #define DRIVER_ADDR_2 0x76 -#define DRIVER_COUNT 2 +#define IS31FL3731_DRIVER_COUNT 2 #define DRIVER_1_LED_TOTAL 32 #define DRIVER_2_LED_TOTAL 32 #define ISSI_DRIVER_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)