diff options
31 files changed, 133 insertions, 102 deletions
diff --git a/drivers/led/issi/is31fl3741.c b/drivers/led/issi/is31fl3741.c index 5c84ac2067..2459677df0 100644 --- a/drivers/led/issi/is31fl3741.c +++ b/drivers/led/issi/is31fl3741.c @@ -17,12 +17,10 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "wait.h" - #include "is31fl3741.h" #include <string.h> #include "i2c_master.h" -#include "progmem.h" +#include "wait.h" // This is a 7-bit address, that gets left-shifted and bit 0 // set to 0 for write, 1 for read (as per I2C protocol) @@ -34,50 +32,50 @@ // ADDR1 represents A1:A0 of the 7-bit address. // ADDR2 represents A3:A2 of the 7-bit address. // The result is: 0b101(ADDR2)(ADDR1) -#define ISSI_ADDR_DEFAULT 0x60 - -#define ISSI_COMMANDREGISTER 0xFD -#define ISSI_COMMANDREGISTER_WRITELOCK 0xFE -#define ISSI_INTERRUPTMASKREGISTER 0xF0 -#define ISSI_INTERRUPTSTATUSREGISTER 0xF1 -#define ISSI_IDREGISTER 0xFC - -#define ISSI_PAGE_PWM0 0x00 // PG0 -#define ISSI_PAGE_PWM1 0x01 // PG1 -#define ISSI_PAGE_SCALING_0 0x02 // PG2 -#define ISSI_PAGE_SCALING_1 0x03 // PG3 -#define ISSI_PAGE_FUNCTION 0x04 // PG4 - -#define ISSI_REG_CONFIGURATION 0x00 // PG4 -#define ISSI_REG_GLOBALCURRENT 0x01 // PG4 -#define ISSI_REG_PULLDOWNUP 0x02 // PG4 -#define ISSI_REG_RESET 0x3F // PG4 - -#ifndef ISSI_TIMEOUT -# define ISSI_TIMEOUT 100 +#define IS31FL3741_I2C_ADDRESS_DEFAULT 0x60 + +#define IS31FL3741_COMMANDREGISTER 0xFD +#define IS31FL3741_COMMANDREGISTER_WRITELOCK 0xFE +#define IS31FL3741_INTERRUPTMASKREGISTER 0xF0 +#define IS31FL3741_INTERRUPTSTATUSREGISTER 0xF1 +#define IS31FL3741_IDREGISTER 0xFC + +#define IS31FL3741_PAGE_PWM0 0x00 // PG0 +#define IS31FL3741_PAGE_PWM1 0x01 // PG1 +#define IS31FL3741_PAGE_SCALING_0 0x02 // PG2 +#define IS31FL3741_PAGE_SCALING_1 0x03 // PG3 +#define IS31FL3741_PAGE_FUNCTION 0x04 // PG4 + +#define IS31FL3741_REG_CONFIGURATION 0x00 // PG4 +#define IS31FL3741_REG_GLOBALCURRENT 0x01 // PG4 +#define IS31FL3741_REG_PULLDOWNUP 0x02 // PG4 +#define IS31FL3741_REG_RESET 0x3F // PG4 + +#ifndef IS31FL3741_I2C_TIMEOUT +# define IS31FL3741_I2C_TIMEOUT 100 #endif -#ifndef ISSI_PERSISTENCE -# define ISSI_PERSISTENCE 0 +#ifndef IS31FL3741_I2C_PERSISTENCE +# define IS31FL3741_I2C_PERSISTENCE 0 #endif -#ifndef ISSI_CONFIGURATION -# define ISSI_CONFIGURATION 0x01 +#ifndef IS31FL3741_CONFIGURATION +# define IS31FL3741_CONFIGURATION 0x01 #endif -#ifndef ISSI_SWPULLUP -# define ISSI_SWPULLUP PUR_32KR +#ifndef IS31FL3741_SWPULLUP +# define IS31FL3741_SWPULLUP IS31FL3741_PUR_32KR #endif -#ifndef ISSI_CSPULLUP -# define ISSI_CSPULLUP PUR_32KR +#ifndef IS31FL3741_CSPULLUP +# define IS31FL3741_CSPULLUP IS31FL3741_PUR_32KR #endif -#ifndef ISSI_GLOBALCURRENT -# define ISSI_GLOBALCURRENT 0xFF +#ifndef IS31FL3741_GLOBALCURRENT +# define IS31FL3741_GLOBALCURRENT 0xFF #endif -#define ISSI_MAX_LEDS 351 +#define IS31FL3741_MAX_LEDS 351 // Transfer buffer for TWITransmitData() uint8_t g_twi_transfer_buffer[20] = {0xFF}; @@ -88,22 +86,22 @@ uint8_t g_twi_transfer_buffer[20] = {0xFF}; // We could optimize this and take out the unused registers from these // buffers and the transfers in is31fl3741_write_pwm_buffer() but it's // probably not worth the extra complexity. -uint8_t g_pwm_buffer[DRIVER_COUNT][ISSI_MAX_LEDS]; -bool g_pwm_buffer_update_required[DRIVER_COUNT] = {false}; -bool g_scaling_registers_update_required[DRIVER_COUNT] = {false}; +uint8_t g_pwm_buffer[IS31FL3741_DRIVER_COUNT][IS31FL3741_MAX_LEDS]; +bool g_pwm_buffer_update_required[IS31FL3741_DRIVER_COUNT] = {false}; +bool g_scaling_registers_update_required[IS31FL3741_DRIVER_COUNT] = {false}; -uint8_t g_scaling_registers[DRIVER_COUNT][ISSI_MAX_LEDS]; +uint8_t g_scaling_registers[IS31FL3741_DRIVER_COUNT][IS31FL3741_MAX_LEDS]; void is31fl3741_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 IS31FL3741_I2C_PERSISTENCE > 0 + for (uint8_t i = 0; i < IS31FL3741_I2C_PERSISTENCE; i++) { + if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3741_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, IS31FL3741_I2C_TIMEOUT); #endif } @@ -113,21 +111,21 @@ bool is31fl3741_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) { for (int i = 0; i < 342; i += 18) { if (i == 180) { // unlock the command register and select PG1 - is31fl3741_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); - is31fl3741_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM1); + is31fl3741_write_register(addr, IS31FL3741_COMMANDREGISTER_WRITELOCK, 0xC5); + is31fl3741_write_register(addr, IS31FL3741_COMMANDREGISTER, IS31FL3741_PAGE_PWM1); } g_twi_transfer_buffer[0] = i % 180; memcpy(g_twi_transfer_buffer + 1, pwm_buffer + i, 18); -#if ISSI_PERSISTENCE > 0 - for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) { - if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 19, ISSI_TIMEOUT) != 0) { +#if IS31FL3741_I2C_PERSISTENCE > 0 + for (uint8_t i = 0; i < IS31FL3741_I2C_PERSISTENCE; i++) { + if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 19, IS31FL3741_I2C_TIMEOUT) != 0) { return false; } } #else - if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 19, ISSI_TIMEOUT) != 0) { + if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 19, IS31FL3741_I2C_TIMEOUT) != 0) { return false; } #endif @@ -137,14 +135,14 @@ bool is31fl3741_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) { g_twi_transfer_buffer[0] = 162; memcpy(g_twi_transfer_buffer + 1, pwm_buffer + 342, 9); -#if ISSI_PERSISTENCE > 0 - for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) { - if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 10, ISSI_TIMEOUT) != 0) { +#if IS31FL3741_I2C_PERSISTENCE > 0 + for (uint8_t i = 0; i < IS31FL3741_I2C_PERSISTENCE; i++) { + if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 10, IS31FL3741_I2C_TIMEOUT) != 0) { return false; } } #else - if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 10, ISSI_TIMEOUT) != 0) { + if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 10, IS31FL3741_I2C_TIMEOUT) != 0) { return false; } #endif @@ -160,18 +158,18 @@ void is31fl3741_init(uint8_t addr) { // Unlock the command register. // Unlock the command register. - is31fl3741_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); + is31fl3741_write_register(addr, IS31FL3741_COMMANDREGISTER_WRITELOCK, 0xC5); // Select PG4 - is31fl3741_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_FUNCTION); + is31fl3741_write_register(addr, IS31FL3741_COMMANDREGISTER, IS31FL3741_PAGE_FUNCTION); // Set to Normal operation - is31fl3741_write_register(addr, ISSI_REG_CONFIGURATION, ISSI_CONFIGURATION); + is31fl3741_write_register(addr, IS31FL3741_REG_CONFIGURATION, IS31FL3741_CONFIGURATION); // Set Golbal Current Control Register - is31fl3741_write_register(addr, ISSI_REG_GLOBALCURRENT, ISSI_GLOBALCURRENT); + is31fl3741_write_register(addr, IS31FL3741_REG_GLOBALCURRENT, IS31FL3741_GLOBALCURRENT); // Set Pull up & Down for SWx CSy - is31fl3741_write_register(addr, ISSI_REG_PULLDOWNUP, ((ISSI_CSPULLUP << 4) | ISSI_SWPULLUP)); + is31fl3741_write_register(addr, IS31FL3741_REG_PULLDOWNUP, ((IS31FL3741_CSPULLUP << 4) | IS31FL3741_SWPULLUP)); // is31fl3741_update_led_scaling_registers(addr, 0xFF, 0xFF, 0xFF); @@ -228,8 +226,8 @@ void is31fl3741_set_led_control_register(uint8_t index, bool red, bool green, bo void is31fl3741_update_pwm_buffers(uint8_t addr, uint8_t index) { if (g_pwm_buffer_update_required[index]) { // unlock the command register and select PG2 - is31fl3741_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); - is31fl3741_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM0); + is31fl3741_write_register(addr, IS31FL3741_COMMANDREGISTER_WRITELOCK, 0xC5); + is31fl3741_write_register(addr, IS31FL3741_COMMANDREGISTER, IS31FL3741_PAGE_PWM0); is31fl3741_write_pwm_buffer(addr, g_pwm_buffer[index]); } @@ -248,8 +246,8 @@ void is31fl3741_set_pwm_buffer(const is31_led *pled, uint8_t red, uint8_t green, void is31fl3741_update_led_control_registers(uint8_t addr, uint8_t index) { if (g_scaling_registers_update_required[index]) { // unlock the command register and select PG2 - is31fl3741_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); - is31fl3741_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_SCALING_0); + is31fl3741_write_register(addr, IS31FL3741_COMMANDREGISTER_WRITELOCK, 0xC5); + is31fl3741_write_register(addr, IS31FL3741_COMMANDREGISTER, IS31FL3741_PAGE_SCALING_0); // CS1_SW1 to CS30_SW6 are on PG2 for (int i = CS1_SW1; i <= CS30_SW6; ++i) { @@ -257,8 +255,8 @@ void is31fl3741_update_led_control_registers(uint8_t addr, uint8_t index) { } // unlock the command register and select PG3 - is31fl3741_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); - is31fl3741_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_SCALING_1); + is31fl3741_write_register(addr, IS31FL3741_COMMANDREGISTER_WRITELOCK, 0xC5); + is31fl3741_write_register(addr, IS31FL3741_COMMANDREGISTER, IS31FL3741_PAGE_SCALING_1); // CS1_SW7 to CS39_SW9 are on PG3 for (int i = CS1_SW7; i <= CS39_SW9; ++i) { diff --git a/drivers/led/issi/is31fl3741.h b/drivers/led/issi/is31fl3741.h index 4ae84dc3c6..ffa4be9250 100644 --- a/drivers/led/issi/is31fl3741.h +++ b/drivers/led/issi/is31fl3741.h @@ -23,6 +23,39 @@ #include <stdbool.h> #include "progmem.h" +// ======== DEPRECATED DEFINES - DO NOT USE ======== +#ifdef DRIVER_COUNT +# define IS31FL3741_DRIVER_COUNT DRIVER_COUNT +#endif +#ifdef ISSI_TIMEOUT +# define IS31FL3741_I2C_TIMEOUT ISSI_TIMEOUT +#endif +#ifdef ISSI_PERSISTENCE +# define IS31FL3741_I2C_PERSISTENCE ISSI_PERSISTENCE +#endif +#ifdef ISSI_CONFIGURATION +# define IS31FL3741_CONFIGURATION ISSI_CONFIGURATION +#endif +#ifdef ISSI_SWPULLUP +# define IS31FL3741_SWPULLUP ISSI_SWPULLUP +#endif +#ifdef ISSI_CSPULLUP +# define IS31FL3741_CSPULLUP ISSI_CSPULLUP +#endif +#ifdef ISSI_GLOBALCURRENT +# define IS31FL3741_GLOBALCURRENT ISSI_GLOBALCURRENT +#endif + +#define PUR_0R IS31FL3741_PUR_0R +#define PUR_05KR IS31FL3741_PUR_05KR +#define PUR_1KR IS31FL3741_PUR_1KR +#define PUR_2KR IS31FL3741_PUR_2KR +#define PUR_4KR IS31FL3741_PUR_4KR +#define PUR_8KR IS31FL3741_PUR_8KR +#define PUR_16KR IS31FL3741_PUR_16KR +#define PUR_32KR IS31FL3741_PUR_32KR +// ======== + typedef struct is31_led { uint32_t driver : 2; uint32_t r : 10; @@ -51,14 +84,14 @@ void is31fl3741_set_scaling_registers(const is31_led *pled, uint8_t red, uint8_t void is31fl3741_set_pwm_buffer(const is31_led *pled, uint8_t red, uint8_t green, uint8_t blue); -#define PUR_0R 0x00 // No PUR resistor -#define PUR_05KR 0x01 // 0.5k Ohm resistor -#define PUR_1KR 0x02 // 1.0k Ohm resistor -#define PUR_2KR 0x03 // 2.0k Ohm resistor -#define PUR_4KR 0x04 // 4.0k Ohm resistor -#define PUR_8KR 0x05 // 8.0k Ohm resistor -#define PUR_16KR 0x06 // 16k Ohm resistor -#define PUR_32KR 0x07 // 32k Ohm resistor +#define IS31FL3741_PUR_0R 0x00 // No PUR resistor +#define IS31FL3741_PUR_05KR 0x01 // 0.5k Ohm resistor +#define IS31FL3741_PUR_1KR 0x02 // 1.0k Ohm resistor +#define IS31FL3741_PUR_2KR 0x03 // 2.0k Ohm resistor +#define IS31FL3741_PUR_4KR 0x04 // 4.0k Ohm resistor +#define IS31FL3741_PUR_8KR 0x05 // 8.0k Ohm resistor +#define IS31FL3741_PUR_16KR 0x06 // 16k Ohm resistor +#define IS31FL3741_PUR_32KR 0x07 // 32k Ohm resistor #define CS1_SW1 0x00 #define CS2_SW1 0x01 diff --git a/keyboards/acheron/apollo/87h/gamma/config.h b/keyboards/acheron/apollo/87h/gamma/config.h index 6209fa21f7..9d681aedb5 100644 --- a/keyboards/acheron/apollo/87h/gamma/config.h +++ b/keyboards/acheron/apollo/87h/gamma/config.h @@ -27,7 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // RGB Matrix defines #define DRIVER_ADDR_1 0b0110000 -#define DRIVER_COUNT 1 +#define IS31FL3741_DRIVER_COUNT 1 #define DRIVER_1_LED_TOTAL 87 #define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL #define ISSI_DRIVER_TOTAL RGB_MATRIX_LED_COUNT diff --git a/keyboards/dztech/dz65rgb/v3/config.h b/keyboards/dztech/dz65rgb/v3/config.h index 421ae8277c..2077bd93d4 100755 --- a/keyboards/dztech/dz65rgb/v3/config.h +++ b/keyboards/dztech/dz65rgb/v3/config.h @@ -73,7 +73,7 @@ # define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL # define DRIVER_ADDR_1 0b0110000 -# define DRIVER_COUNT 1 +# define IS31FL3741_DRIVER_COUNT 1 # define RGB_MATRIX_LED_COUNT 68 # define DRIVER_INDICATOR_LED_TOTAL 0 #endif diff --git a/keyboards/ilumkb/simpler61/config.h b/keyboards/ilumkb/simpler61/config.h index 151eba96c9..12c6390683 100644 --- a/keyboards/ilumkb/simpler61/config.h +++ b/keyboards/ilumkb/simpler61/config.h @@ -22,7 +22,7 @@ #define RGB_MATRIX_LED_FLUSH_LIMIT 26 #define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL #define DRIVER_ADDR_1 0b0110000 -#define DRIVER_COUNT 1 +#define IS31FL3741_DRIVER_COUNT 1 #define DRIVER_1_LED_TOTAL 61 #define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL #define DRIVER_INDICATOR_LED_TOTAL 0 diff --git a/keyboards/ilumkb/simpler64/config.h b/keyboards/ilumkb/simpler64/config.h index 5554f56bd1..58268e23cf 100644 --- a/keyboards/ilumkb/simpler64/config.h +++ b/keyboards/ilumkb/simpler64/config.h @@ -22,7 +22,7 @@ #define RGB_MATRIX_LED_FLUSH_LIMIT 26 #define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL #define DRIVER_ADDR_1 0b0110000 -#define DRIVER_COUNT 1 +#define IS31FL3741_DRIVER_COUNT 1 #define DRIVER_1_LED_TOTAL 64 #define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL #define DRIVER_INDICATOR_LED_TOTAL 0 diff --git a/keyboards/kbdcraft/adam64/config.h b/keyboards/kbdcraft/adam64/config.h index 81101bbb61..c7fa1aecc9 100644 --- a/keyboards/kbdcraft/adam64/config.h +++ b/keyboards/kbdcraft/adam64/config.h @@ -23,7 +23,7 @@ #define I2C1_CLOCK_SPEED 400000 #define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_16_9 -#define DRIVER_COUNT 1 +#define IS31FL3741_DRIVER_COUNT 1 #define DRIVER_ADDR_1 0b0110000 #define RGB_MATRIX_LED_COUNT 64 diff --git a/keyboards/kbdfans/bella/rgb/config.h b/keyboards/kbdfans/bella/rgb/config.h index c8114dc57b..8e416d77d9 100644 --- a/keyboards/kbdfans/bella/rgb/config.h +++ b/keyboards/kbdfans/bella/rgb/config.h @@ -72,7 +72,7 @@ //#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_COLOR #define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL #define DRIVER_ADDR_1 0b0110000 -#define DRIVER_COUNT 1 +#define IS31FL3741_DRIVER_COUNT 1 #define RGB_MATRIX_LED_COUNT 108 #define DRIVER_INDICATOR_LED_TOTAL 0 #endif diff --git a/keyboards/kbdfans/bella/rgb_iso/config.h b/keyboards/kbdfans/bella/rgb_iso/config.h index 8dea9c2164..50d5120beb 100644 --- a/keyboards/kbdfans/bella/rgb_iso/config.h +++ b/keyboards/kbdfans/bella/rgb_iso/config.h @@ -72,7 +72,7 @@ //#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_COLOR #define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL #define DRIVER_ADDR_1 0b0110000 -#define DRIVER_COUNT 1 +#define IS31FL3741_DRIVER_COUNT 1 #define RGB_MATRIX_LED_COUNT 109 #define DRIVER_INDICATOR_LED_TOTAL 0 #endif diff --git a/keyboards/kbdfans/boop65/rgb/config.h b/keyboards/kbdfans/boop65/rgb/config.h index c1955ac84f..0e80e2c67e 100644 --- a/keyboards/kbdfans/boop65/rgb/config.h +++ b/keyboards/kbdfans/boop65/rgb/config.h @@ -27,7 +27,7 @@ # define RGB_MATRIX_DEFAULT_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set # define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL # define DRIVER_ADDR_1 0b0110000 -# define DRIVER_COUNT 1 +# define IS31FL3741_DRIVER_COUNT 1 # define RGB_MATRIX_LED_COUNT 83 # define DRIVER_INDICATOR_LED_TOTAL 0 #define ENABLE_RGB_MATRIX_ALPHAS_MODS diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v3/config.h b/keyboards/kbdfans/kbd67/mkiirgb/v3/config.h index e291fa6368..d36bce7d83 100755 --- a/keyboards/kbdfans/kbd67/mkiirgb/v3/config.h +++ b/keyboards/kbdfans/kbd67/mkiirgb/v3/config.h @@ -73,7 +73,7 @@ #define RGB_MATRIX_LED_FLUSH_LIMIT 26 #define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL #define DRIVER_ADDR_1 0b0110000 -#define DRIVER_COUNT 1 +#define IS31FL3741_DRIVER_COUNT 1 #define RGB_MATRIX_LED_COUNT 67 #define DRIVER_INDICATOR_LED_TOTAL 0 #endif diff --git a/keyboards/kprepublic/bm68hsrgb/rev2/config.h b/keyboards/kprepublic/bm68hsrgb/rev2/config.h index 3e74f353f9..15f47e8ba5 100644 --- a/keyboards/kprepublic/bm68hsrgb/rev2/config.h +++ b/keyboards/kprepublic/bm68hsrgb/rev2/config.h @@ -20,7 +20,7 @@ #define DRIVER_ADDR_1 0b0110000 -#define DRIVER_COUNT 1 +#define IS31FL3741_DRIVER_COUNT 1 #define DRIVER_1_LED_TOTAL 68 #define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL #define DRIVER_INDICATOR_LED_TOTAL 0 diff --git a/keyboards/kprepublic/bm80v2/config.h b/keyboards/kprepublic/bm80v2/config.h index 98a784d638..3eea8c3aa4 100644 --- a/keyboards/kprepublic/bm80v2/config.h +++ b/keyboards/kprepublic/bm80v2/config.h @@ -54,7 +54,7 @@ #define ENABLE_RGB_MATRIX_SOLID_SPLASH #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #define DRIVER_ADDR_1 0b0110000 -#define DRIVER_COUNT 1 +#define IS31FL3741_DRIVER_COUNT 1 #define DRIVER_1_LED_TOTAL 87 #define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL diff --git a/keyboards/kprepublic/bm80v2_iso/config.h b/keyboards/kprepublic/bm80v2_iso/config.h index 526150acbd..98c712703d 100644 --- a/keyboards/kprepublic/bm80v2_iso/config.h +++ b/keyboards/kprepublic/bm80v2_iso/config.h @@ -55,7 +55,7 @@ #define ENABLE_RGB_MATRIX_SOLID_SPLASH #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #define DRIVER_ADDR_1 0b0110000 -#define DRIVER_COUNT 1 +#define IS31FL3741_DRIVER_COUNT 1 #define DRIVER_1_LED_TOTAL 88 #define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL diff --git a/keyboards/mechlovin/adelais/rgb_led/rev3/config.h b/keyboards/mechlovin/adelais/rgb_led/rev3/config.h index c4961c6492..8620ab3949 100644 --- a/keyboards/mechlovin/adelais/rgb_led/rev3/config.h +++ b/keyboards/mechlovin/adelais/rgb_led/rev3/config.h @@ -30,7 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // 0b1110101 AD <-> SCL // 0b1110110 AD <-> SDA #define DRIVER_ADDR_1 0b0110010 -#define DRIVER_COUNT 1 +#define IS31FL3741_DRIVER_COUNT 1 #define RGB_MATRIX_LED_COUNT 66 #define RGB_MATRIX_KEYPRESSES // reacts to keypresses diff --git a/keyboards/mechlovin/infinity87/rgb_rev1/config.h b/keyboards/mechlovin/infinity87/rgb_rev1/config.h index 10fc42f830..84acb09308 100644 --- a/keyboards/mechlovin/infinity87/rgb_rev1/config.h +++ b/keyboards/mechlovin/infinity87/rgb_rev1/config.h @@ -81,6 +81,6 @@ #define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL //#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_REACTIVE_SIMPLE #define DRIVER_ADDR_1 0b0110010 -#define DRIVER_COUNT 1 +#define IS31FL3741_DRIVER_COUNT 1 #define RGB_MATRIX_LED_COUNT 91 #define DRIVER_INDICATOR_LED_TOTAL 0 diff --git a/keyboards/melgeek/mach80/config.h b/keyboards/melgeek/mach80/config.h index f73ab7345c..4850f9a177 100755 --- a/keyboards/melgeek/mach80/config.h +++ b/keyboards/melgeek/mach80/config.h @@ -26,7 +26,7 @@ //#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_COLOR #define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL #define DRIVER_ADDR_1 0b0110000 -#define DRIVER_COUNT 1 +#define IS31FL3741_DRIVER_COUNT 1 #define ENABLE_RGB_MATRIX_ALPHAS_MODS #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN diff --git a/keyboards/melgeek/mj61/config.h b/keyboards/melgeek/mj61/config.h index af2393e5ec..64f144d43a 100644 --- a/keyboards/melgeek/mj61/config.h +++ b/keyboards/melgeek/mj61/config.h @@ -71,4 +71,4 @@ //#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_COLOR #define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL #define DRIVER_ADDR_1 0b0110000 -#define DRIVER_COUNT 1 +#define IS31FL3741_DRIVER_COUNT 1 diff --git a/keyboards/melgeek/mj63/config.h b/keyboards/melgeek/mj63/config.h index af2393e5ec..64f144d43a 100644 --- a/keyboards/melgeek/mj63/config.h +++ b/keyboards/melgeek/mj63/config.h @@ -71,4 +71,4 @@ //#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_COLOR #define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL #define DRIVER_ADDR_1 0b0110000 -#define DRIVER_COUNT 1 +#define IS31FL3741_DRIVER_COUNT 1 diff --git a/keyboards/melgeek/mj64/config.h b/keyboards/melgeek/mj64/config.h index af2393e5ec..64f144d43a 100644 --- a/keyboards/melgeek/mj64/config.h +++ b/keyboards/melgeek/mj64/config.h @@ -71,4 +71,4 @@ //#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_COLOR #define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL #define DRIVER_ADDR_1 0b0110000 -#define DRIVER_COUNT 1 +#define IS31FL3741_DRIVER_COUNT 1 diff --git a/keyboards/melgeek/mj65/config.h b/keyboards/melgeek/mj65/config.h index af2393e5ec..64f144d43a 100644 --- a/keyboards/melgeek/mj65/config.h +++ b/keyboards/melgeek/mj65/config.h @@ -71,4 +71,4 @@ //#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_COLOR #define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL #define DRIVER_ADDR_1 0b0110000 -#define DRIVER_COUNT 1 +#define IS31FL3741_DRIVER_COUNT 1 diff --git a/keyboards/melgeek/mojo68/config.h b/keyboards/melgeek/mojo68/config.h index b5f846ae78..0353fb8fc7 100755 --- a/keyboards/melgeek/mojo68/config.h +++ b/keyboards/melgeek/mojo68/config.h @@ -70,4 +70,4 @@ //#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_COLOR #define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL #define DRIVER_ADDR_1 0b0110000 -#define DRIVER_COUNT 1 +#define IS31FL3741_DRIVER_COUNT 1 diff --git a/keyboards/melgeek/mojo75/config.h b/keyboards/melgeek/mojo75/config.h index bdee36b66b..3f95a82ea9 100644 --- a/keyboards/melgeek/mojo75/config.h +++ b/keyboards/melgeek/mojo75/config.h @@ -72,4 +72,4 @@ #define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL //#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_REACTIVE_SIMPLE #define DRIVER_ADDR_1 0b0110000 -#define DRIVER_COUNT 1 +#define IS31FL3741_DRIVER_COUNT 1 diff --git a/keyboards/melgeek/tegic/config.h b/keyboards/melgeek/tegic/config.h index e371af9552..ea457a3fcb 100755 --- a/keyboards/melgeek/tegic/config.h +++ b/keyboards/melgeek/tegic/config.h @@ -23,7 +23,7 @@ //#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_COLOR #define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL #define DRIVER_ADDR_1 0b0110000 -#define DRIVER_COUNT 1 +#define IS31FL3741_DRIVER_COUNT 1 #define ENABLE_RGB_MATRIX_ALPHAS_MODS #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN diff --git a/keyboards/melgeek/z70ultra/config.h b/keyboards/melgeek/z70ultra/config.h index 3c19a6f93c..978982a5b1 100644 --- a/keyboards/melgeek/z70ultra/config.h +++ b/keyboards/melgeek/z70ultra/config.h @@ -71,6 +71,6 @@ //#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_COLOR #define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL #define DRIVER_ADDR_1 0b0110000 -#define DRIVER_COUNT 1 +#define IS31FL3741_DRIVER_COUNT 1 #define RGB_MATRIX_LED_COUNT 69 #define DRIVER_INDICATOR_LED_TOTAL 6 diff --git a/keyboards/owlab/voice65/hotswap/config.h b/keyboards/owlab/voice65/hotswap/config.h index 04bd741d77..ccf103cfa3 100644 --- a/keyboards/owlab/voice65/hotswap/config.h +++ b/keyboards/owlab/voice65/hotswap/config.h @@ -30,7 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 # define RGB_MATRIX_DEFAULT_VAL 128 # define DRIVER_ADDR_1 0b0110000 -# define DRIVER_COUNT 1 +# define IS31FL3741_DRIVER_COUNT 1 # define RGB_MATRIX_LED_COUNT 67 // RGB Matrix Animation modes. Explicitly enabled // For full list of effects, see: diff --git a/keyboards/owlab/voice65/soldered/config.h b/keyboards/owlab/voice65/soldered/config.h index 66e412effb..0cb0678b43 100644 --- a/keyboards/owlab/voice65/soldered/config.h +++ b/keyboards/owlab/voice65/soldered/config.h @@ -30,7 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 # define RGB_MATRIX_DEFAULT_VAL 128 # define DRIVER_ADDR_1 0b0110000 -# define DRIVER_COUNT 1 +# define IS31FL3741_DRIVER_COUNT 1 # define RGB_MATRIX_LED_COUNT 71 // RGB Matrix Animation modes. Explicitly enabled diff --git a/keyboards/tkc/portico68v2/config.h b/keyboards/tkc/portico68v2/config.h index fd0191d101..1c9f946cb7 100644 --- a/keyboards/tkc/portico68v2/config.h +++ b/keyboards/tkc/portico68v2/config.h @@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once #define DRIVER_ADDR_1 0b0110000 -#define DRIVER_COUNT 1 +#define IS31FL3741_DRIVER_COUNT 1 #define DRIVER_1_LED_TOTAL 82 #define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL #define DRIVER_INDICATOR_LED_TOTAL 0 diff --git a/keyboards/tkc/portico75/config.h b/keyboards/tkc/portico75/config.h index e72c95981b..d00d38e36a 100644 --- a/keyboards/tkc/portico75/config.h +++ b/keyboards/tkc/portico75/config.h @@ -73,13 +73,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 # define DRIVER_ADDR_1 0b0110000 -# define DRIVER_COUNT 1 +# define IS31FL3741_DRIVER_COUNT 1 # define DRIVER_1_LED_TOTAL 98 # define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL # define DRIVER_INDICATOR_LED_TOTAL 0 #else // WT_RGB IS31FL3741 driver code -# define DRIVER_COUNT 1 +# define IS31FL3741_DRIVER_COUNT 1 # define RGB_MATRIX_LED_COUNT 98 # define RGB_BACKLIGHT_ENABLED 1 diff --git a/keyboards/xelus/pachi/rgb/rev1/config.h b/keyboards/xelus/pachi/rgb/rev1/config.h index 1007f5b3de..dd4c378a66 100644 --- a/keyboards/xelus/pachi/rgb/rev1/config.h +++ b/keyboards/xelus/pachi/rgb/rev1/config.h @@ -42,7 +42,7 @@ // RGB Matrix defines #define DRIVER_ADDR_1 0b0110000 -#define DRIVER_COUNT 1 +#define IS31FL3741_DRIVER_COUNT 1 #define DRIVER_1_LED_TOTAL 117 #define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL #define ISSI_DRIVER_TOTAL RGB_MATRIX_LED_COUNT diff --git a/keyboards/xelus/pachi/rgb/rev2/config.h b/keyboards/xelus/pachi/rgb/rev2/config.h index a11aa27d3b..939721c224 100644 --- a/keyboards/xelus/pachi/rgb/rev2/config.h +++ b/keyboards/xelus/pachi/rgb/rev2/config.h @@ -39,7 +39,7 @@ // RGB Matrix defines #define DRIVER_ADDR_1 0b0110000 -#define DRIVER_COUNT 1 +#define IS31FL3741_DRIVER_COUNT 1 #define DRIVER_1_LED_TOTAL 117 #define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL #define ISSI_DRIVER_TOTAL RGB_MATRIX_LED_COUNT |