diff options
Diffstat (limited to 'drivers/led/issi')
26 files changed, 468 insertions, 36 deletions
diff --git a/drivers/led/issi/is31fl3218-simple.c b/drivers/led/issi/is31fl3218-simple.c index a78dedfcf1..bdf3187fe1 100644 --- a/drivers/led/issi/is31fl3218-simple.c +++ b/drivers/led/issi/is31fl3218-simple.c @@ -68,6 +68,8 @@ void is31fl3218_write_pwm_buffer(uint8_t *pwm_buffer) { } void is31fl3218_init(void) { + i2c_init(); + // In case we ever want to reinitialize (?) is31fl3218_write_register(IS31FL3218_REG_RESET, 0x00); @@ -86,11 +88,17 @@ void is31fl3218_init(void) { // Load PWM registers and LED Control register data is31fl3218_write_register(IS31FL3218_REG_UPDATE, 0x01); + + for (int i = 0; i < IS31FL3218_LED_COUNT; i++) { + is31fl3218_set_led_control_register(i, true); + } + + is31fl3218_update_led_control_registers(); } void is31fl3218_set_value(int index, uint8_t value) { is31fl3218_led_t led; - if (index >= 0 && index < LED_MATRIX_LED_COUNT) { + if (index >= 0 && index < IS31FL3218_LED_COUNT) { memcpy_P(&led, (&g_is31fl3218_leds[index]), sizeof(led)); } if (g_pwm_buffer[led.v - IS31FL3218_REG_PWM] == value) { @@ -101,7 +109,7 @@ void is31fl3218_set_value(int index, uint8_t value) { } void is31fl3218_set_value_all(uint8_t value) { - for (int i = 0; i < LED_MATRIX_LED_COUNT; i++) { + for (int i = 0; i < IS31FL3218_LED_COUNT; i++) { is31fl3218_set_value(i, value); } } diff --git a/drivers/led/issi/is31fl3218-simple.h b/drivers/led/issi/is31fl3218-simple.h index 34a4886957..959990a93f 100644 --- a/drivers/led/issi/is31fl3218-simple.h +++ b/drivers/led/issi/is31fl3218-simple.h @@ -30,7 +30,7 @@ typedef struct is31fl3218_led_t { uint8_t v; } __attribute__((packed)) is31fl3218_led_t; -extern const is31fl3218_led_t PROGMEM g_is31fl3218_leds[LED_MATRIX_LED_COUNT]; +extern const is31fl3218_led_t PROGMEM g_is31fl3218_leds[IS31FL3218_LED_COUNT]; void is31fl3218_init(void); diff --git a/drivers/led/issi/is31fl3218.c b/drivers/led/issi/is31fl3218.c index 87a0acfc08..04523a3c01 100644 --- a/drivers/led/issi/is31fl3218.c +++ b/drivers/led/issi/is31fl3218.c @@ -68,6 +68,8 @@ void is31fl3218_write_pwm_buffer(uint8_t *pwm_buffer) { } void is31fl3218_init(void) { + i2c_init(); + // In case we ever want to reinitialize (?) is31fl3218_write_register(IS31FL3218_REG_RESET, 0x00); @@ -86,11 +88,17 @@ void is31fl3218_init(void) { // Load PWM registers and LED Control register data is31fl3218_write_register(IS31FL3218_REG_UPDATE, 0x01); + + for (int i = 0; i < IS31FL3218_LED_COUNT; i++) { + is31fl3218_set_led_control_register(i, true, true, true); + } + + is31fl3218_update_led_control_registers(); } void is31fl3218_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { is31fl3218_led_t led; - if (index >= 0 && index < RGB_MATRIX_LED_COUNT) { + if (index >= 0 && index < IS31FL3218_LED_COUNT) { memcpy_P(&led, (&g_is31fl3218_leds[index]), sizeof(led)); } if (g_pwm_buffer[led.r - IS31FL3218_REG_PWM] == red && g_pwm_buffer[led.g - IS31FL3218_REG_PWM] == green && g_pwm_buffer[led.b - IS31FL3218_REG_PWM] == blue) { @@ -103,7 +111,7 @@ void is31fl3218_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { } void is31fl3218_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { - for (int i = 0; i < RGB_MATRIX_LED_COUNT; i++) { + for (int i = 0; i < IS31FL3218_LED_COUNT; i++) { is31fl3218_set_color(i, red, green, blue); } } diff --git a/drivers/led/issi/is31fl3218.h b/drivers/led/issi/is31fl3218.h index 844e11f490..c48bc2f238 100644 --- a/drivers/led/issi/is31fl3218.h +++ b/drivers/led/issi/is31fl3218.h @@ -32,7 +32,7 @@ typedef struct is31fl3218_led_t { uint8_t b; } __attribute__((packed)) is31fl3218_led_t; -extern const is31fl3218_led_t PROGMEM g_is31fl3218_leds[RGB_MATRIX_LED_COUNT]; +extern const is31fl3218_led_t PROGMEM g_is31fl3218_leds[IS31FL3218_LED_COUNT]; void is31fl3218_init(void); diff --git a/drivers/led/issi/is31fl3731-simple.c b/drivers/led/issi/is31fl3731-simple.c index adf2ccfca0..3663d30c10 100644 --- a/drivers/led/issi/is31fl3731-simple.c +++ b/drivers/led/issi/is31fl3731-simple.c @@ -104,6 +104,36 @@ void is31fl3731_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) { } } +void is31fl3731_init_drivers(void) { + i2c_init(); + + is31fl3731_init(IS31FL3731_I2C_ADDRESS_1); +#if defined(IS31FL3731_I2C_ADDRESS_2) + is31fl3731_init(IS31FL3731_I2C_ADDRESS_2); +# if defined(IS31FL3731_I2C_ADDRESS_3) + is31fl3731_init(IS31FL3731_I2C_ADDRESS_3); +# if defined(IS31FL3731_I2C_ADDRESS_4) + is31fl3731_init(IS31FL3731_I2C_ADDRESS_4); +# endif +# endif +#endif + + for (int i = 0; i < IS31FL3731_LED_COUNT; i++) { + is31fl3731_set_led_control_register(i, true); + } + + is31fl3731_update_led_control_registers(IS31FL3731_I2C_ADDRESS_1, 0); +#if defined(IS31FL3731_I2C_ADDRESS_2) + is31fl3731_update_led_control_registers(IS31FL3731_I2C_ADDRESS_2, 1); +# if defined(IS31FL3731_I2C_ADDRESS_3) + is31fl3731_update_led_control_registers(IS31FL3731_I2C_ADDRESS_3, 2); +# if defined(IS31FL3731_I2C_ADDRESS_4) + is31fl3731_update_led_control_registers(IS31FL3731_I2C_ADDRESS_4, 3); +# endif +# endif +#endif +} + void is31fl3731_init(uint8_t addr) { // In order to avoid the LEDs being driven with garbage data // in the LED driver's PWM registers, first enable software shutdown, @@ -161,7 +191,7 @@ void is31fl3731_init(uint8_t addr) { void is31fl3731_set_value(int index, uint8_t value) { is31fl3731_led_t led; - if (index >= 0 && index < LED_MATRIX_LED_COUNT) { + if (index >= 0 && index < IS31FL3731_LED_COUNT) { memcpy_P(&led, (&g_is31fl3731_leds[index]), sizeof(led)); // Subtract 0x24 to get the second index of g_pwm_buffer @@ -175,7 +205,7 @@ void is31fl3731_set_value(int index, uint8_t value) { } void is31fl3731_set_value_all(uint8_t value) { - for (int i = 0; i < LED_MATRIX_LED_COUNT; i++) { + for (int i = 0; i < IS31FL3731_LED_COUNT; i++) { is31fl3731_set_value(i, value); } } diff --git a/drivers/led/issi/is31fl3731-simple.h b/drivers/led/issi/is31fl3731-simple.h index 2ab253717c..32504c1933 100644 --- a/drivers/led/issi/is31fl3731-simple.h +++ b/drivers/led/issi/is31fl3731-simple.h @@ -66,8 +66,9 @@ typedef struct is31fl3731_led_t { uint8_t v; } __attribute__((packed)) is31fl3731_led_t; -extern const is31fl3731_led_t PROGMEM g_is31fl3731_leds[LED_MATRIX_LED_COUNT]; +extern const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT]; +void is31fl3731_init_drivers(void); void is31fl3731_init(uint8_t addr); void is31fl3731_write_register(uint8_t addr, uint8_t reg, uint8_t data); void is31fl3731_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer); diff --git a/drivers/led/issi/is31fl3731.c b/drivers/led/issi/is31fl3731.c index 767c0da0d9..42abd8ed38 100644 --- a/drivers/led/issi/is31fl3731.c +++ b/drivers/led/issi/is31fl3731.c @@ -101,6 +101,36 @@ void is31fl3731_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) { } } +void is31fl3731_init_drivers(void) { + i2c_init(); + + is31fl3731_init(IS31FL3731_I2C_ADDRESS_1); +#if defined(IS31FL3731_I2C_ADDRESS_2) + is31fl3731_init(IS31FL3731_I2C_ADDRESS_2); +# if defined(IS31FL3731_I2C_ADDRESS_3) + is31fl3731_init(IS31FL3731_I2C_ADDRESS_3); +# if defined(IS31FL3731_I2C_ADDRESS_4) + is31fl3731_init(IS31FL3731_I2C_ADDRESS_4); +# endif +# endif +#endif + + for (int i = 0; i < IS31FL3731_LED_COUNT; i++) { + is31fl3731_set_led_control_register(i, true, true, true); + } + + is31fl3731_update_led_control_registers(IS31FL3731_I2C_ADDRESS_1, 0); +#if defined(IS31FL3731_I2C_ADDRESS_2) + is31fl3731_update_led_control_registers(IS31FL3731_I2C_ADDRESS_2, 1); +# if defined(IS31FL3731_I2C_ADDRESS_3) + is31fl3731_update_led_control_registers(IS31FL3731_I2C_ADDRESS_3, 2); +# if defined(IS31FL3731_I2C_ADDRESS_4) + is31fl3731_update_led_control_registers(IS31FL3731_I2C_ADDRESS_4, 3); +# endif +# endif +#endif +} + void is31fl3731_init(uint8_t addr) { // In order to avoid the LEDs being driven with garbage data // in the LED driver's PWM registers, first enable software shutdown, @@ -158,7 +188,7 @@ void is31fl3731_init(uint8_t addr) { void is31fl3731_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { is31fl3731_led_t led; - if (index >= 0 && index < RGB_MATRIX_LED_COUNT) { + if (index >= 0 && index < IS31FL3731_LED_COUNT) { memcpy_P(&led, (&g_is31fl3731_leds[index]), sizeof(led)); // Subtract 0x24 to get the second index of g_pwm_buffer @@ -173,7 +203,7 @@ void is31fl3731_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { } void is31fl3731_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { - for (int i = 0; i < RGB_MATRIX_LED_COUNT; i++) { + for (int i = 0; i < IS31FL3731_LED_COUNT; i++) { is31fl3731_set_color(i, red, green, blue); } } diff --git a/drivers/led/issi/is31fl3731.h b/drivers/led/issi/is31fl3731.h index 756c5b473a..73fa018897 100644 --- a/drivers/led/issi/is31fl3731.h +++ b/drivers/led/issi/is31fl3731.h @@ -67,8 +67,9 @@ typedef struct is31fl3731_led_t { uint8_t b; } __attribute__((packed)) is31fl3731_led_t; -extern const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT]; +extern const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT]; +void is31fl3731_init_drivers(void); void is31fl3731_init(uint8_t addr); void is31fl3731_write_register(uint8_t addr, uint8_t reg, uint8_t data); void is31fl3731_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer); diff --git a/drivers/led/issi/is31fl3733-simple.c b/drivers/led/issi/is31fl3733-simple.c index dbbf86a8f5..aa1b02450c 100644 --- a/drivers/led/issi/is31fl3733-simple.c +++ b/drivers/led/issi/is31fl3733-simple.c @@ -63,6 +63,19 @@ # define IS31FL3733_GLOBALCURRENT 0xFF #endif +#ifndef IS31FL3733_SYNC_1 +# define IS31FL3733_SYNC_1 IS31FL3733_SYNC_NONE +#endif +#ifndef IS31FL3733_SYNC_2 +# define IS31FL3733_SYNC_2 IS31FL3733_SYNC_NONE +#endif +#ifndef IS31FL3733_SYNC_3 +# define IS31FL3733_SYNC_3 IS31FL3733_SYNC_NONE +#endif +#ifndef IS31FL3733_SYNC_4 +# define IS31FL3733_SYNC_4 IS31FL3733_SYNC_NONE +#endif + // Transfer buffer for TWITransmitData() uint8_t g_twi_transfer_buffer[20]; @@ -126,6 +139,36 @@ bool is31fl3733_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) { return true; } +void is31fl3733_init_drivers(void) { + i2c_init(); + + is31fl3733_init(IS31FL3733_I2C_ADDRESS_1, IS31FL3733_SYNC_1); +#if defined(IS31FL3733_I2C_ADDRESS_2) + is31fl3733_init(IS31FL3733_I2C_ADDRESS_2, IS31FL3733_SYNC_2); +# if defined(IS31FL3733_I2C_ADDRESS_3) + is31fl3733_init(IS31FL3733_I2C_ADDRESS_3, IS31FL3733_SYNC_3); +# if defined(IS31FL3733_I2C_ADDRESS_4) + is31fl3733_init(IS31FL3733_I2C_ADDRESS_4, IS31FL3733_SYNC_4); +# endif +# endif +#endif + + for (int i = 0; i < IS31FL3733_LED_COUNT; i++) { + is31fl3733_set_led_control_register(i, true); + } + + is31fl3733_update_led_control_registers(IS31FL3733_I2C_ADDRESS_1, 0); +#if defined(IS31FL3733_I2C_ADDRESS_2) + is31fl3733_update_led_control_registers(IS31FL3733_I2C_ADDRESS_2, 1); +# if defined(IS31FL3733_I2C_ADDRESS_3) + is31fl3733_update_led_control_registers(IS31FL3733_I2C_ADDRESS_3, 2); +# if defined(IS31FL3733_I2C_ADDRESS_4) + is31fl3733_update_led_control_registers(IS31FL3733_I2C_ADDRESS_4, 3); +# endif +# endif +#endif +} + void is31fl3733_init(uint8_t addr, uint8_t sync) { // In order to avoid the LEDs being driven with garbage data // in the LED driver's PWM registers, shutdown is enabled last. @@ -174,7 +217,7 @@ void is31fl3733_init(uint8_t addr, uint8_t sync) { void is31fl3733_set_value(int index, uint8_t value) { is31fl3733_led_t led; - if (index >= 0 && index < LED_MATRIX_LED_COUNT) { + if (index >= 0 && index < IS31FL3733_LED_COUNT) { memcpy_P(&led, (&g_is31fl3733_leds[index]), sizeof(led)); if (g_pwm_buffer[led.driver][led.v] == value) { @@ -186,7 +229,7 @@ void is31fl3733_set_value(int index, uint8_t value) { } void is31fl3733_set_value_all(uint8_t value) { - for (int i = 0; i < LED_MATRIX_LED_COUNT; i++) { + for (int i = 0; i < IS31FL3733_LED_COUNT; i++) { is31fl3733_set_value(i, value); } } diff --git a/drivers/led/issi/is31fl3733-simple.h b/drivers/led/issi/is31fl3733-simple.h index e9f68e3506..367af43c6a 100644 --- a/drivers/led/issi/is31fl3733-simple.h +++ b/drivers/led/issi/is31fl3733-simple.h @@ -85,8 +85,9 @@ typedef struct is31fl3733_led_t { uint8_t v; } __attribute__((packed)) is31fl3733_led_t; -extern const is31fl3733_led_t PROGMEM g_is31fl3733_leds[LED_MATRIX_LED_COUNT]; +extern const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT]; +void is31fl3733_init_drivers(void); void is31fl3733_init(uint8_t addr, uint8_t sync); bool is31fl3733_write_register(uint8_t addr, uint8_t reg, uint8_t data); bool is31fl3733_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer); @@ -119,6 +120,10 @@ void is31fl3733_flush(void); #define IS31FL3733_PWM_FREQUENCY_2K1_HZ 0b011 #define IS31FL3733_PWM_FREQUENCY_1K05_HZ 0b100 +#define IS31FL3733_SYNC_NONE 0b00 +#define IS31FL3733_SYNC_MASTER 0b01 +#define IS31FL3733_SYNC_SLAVE 0b10 + #define A_1 0x00 #define A_2 0x01 #define A_3 0x02 diff --git a/drivers/led/issi/is31fl3733.c b/drivers/led/issi/is31fl3733.c index 35ec96a55a..24b0733030 100644 --- a/drivers/led/issi/is31fl3733.c +++ b/drivers/led/issi/is31fl3733.c @@ -62,6 +62,19 @@ # define IS31FL3733_GLOBALCURRENT 0xFF #endif +#ifndef IS31FL3733_SYNC_1 +# define IS31FL3733_SYNC_1 IS31FL3733_SYNC_NONE +#endif +#ifndef IS31FL3733_SYNC_2 +# define IS31FL3733_SYNC_2 IS31FL3733_SYNC_NONE +#endif +#ifndef IS31FL3733_SYNC_3 +# define IS31FL3733_SYNC_3 IS31FL3733_SYNC_NONE +#endif +#ifndef IS31FL3733_SYNC_4 +# define IS31FL3733_SYNC_4 IS31FL3733_SYNC_NONE +#endif + // Transfer buffer for TWITransmitData() uint8_t g_twi_transfer_buffer[20]; @@ -125,6 +138,36 @@ bool is31fl3733_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) { return true; } +void is31fl3733_init_drivers(void) { + i2c_init(); + + is31fl3733_init(IS31FL3733_I2C_ADDRESS_1, IS31FL3733_SYNC_1); +#if defined(IS31FL3733_I2C_ADDRESS_2) + is31fl3733_init(IS31FL3733_I2C_ADDRESS_2, IS31FL3733_SYNC_2); +# if defined(IS31FL3733_I2C_ADDRESS_3) + is31fl3733_init(IS31FL3733_I2C_ADDRESS_3, IS31FL3733_SYNC_3); +# if defined(IS31FL3733_I2C_ADDRESS_4) + is31fl3733_init(IS31FL3733_I2C_ADDRESS_4, IS31FL3733_SYNC_4); +# endif +# endif +#endif + + for (int i = 0; i < IS31FL3733_LED_COUNT; i++) { + is31fl3733_set_led_control_register(i, true, true, true); + } + + is31fl3733_update_led_control_registers(IS31FL3733_I2C_ADDRESS_1, 0); +#if defined(IS31FL3733_I2C_ADDRESS_2) + is31fl3733_update_led_control_registers(IS31FL3733_I2C_ADDRESS_2, 1); +# if defined(IS31FL3733_I2C_ADDRESS_3) + is31fl3733_update_led_control_registers(IS31FL3733_I2C_ADDRESS_3, 2); +# if defined(IS31FL3733_I2C_ADDRESS_4) + is31fl3733_update_led_control_registers(IS31FL3733_I2C_ADDRESS_4, 3); +# endif +# endif +#endif +} + void is31fl3733_init(uint8_t addr, uint8_t sync) { // In order to avoid the LEDs being driven with garbage data // in the LED driver's PWM registers, shutdown is enabled last. @@ -173,7 +216,7 @@ void is31fl3733_init(uint8_t addr, uint8_t sync) { void is31fl3733_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { is31fl3733_led_t led; - if (index >= 0 && index < RGB_MATRIX_LED_COUNT) { + if (index >= 0 && index < IS31FL3733_LED_COUNT) { memcpy_P(&led, (&g_is31fl3733_leds[index]), sizeof(led)); if (g_pwm_buffer[led.driver][led.r] == red && g_pwm_buffer[led.driver][led.g] == green && g_pwm_buffer[led.driver][led.b] == blue) { @@ -187,7 +230,7 @@ void is31fl3733_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { } void is31fl3733_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { - for (int i = 0; i < RGB_MATRIX_LED_COUNT; i++) { + for (int i = 0; i < IS31FL3733_LED_COUNT; i++) { is31fl3733_set_color(i, red, green, blue); } } diff --git a/drivers/led/issi/is31fl3733.h b/drivers/led/issi/is31fl3733.h index bda6f1908f..4902b3c1d7 100644 --- a/drivers/led/issi/is31fl3733.h +++ b/drivers/led/issi/is31fl3733.h @@ -110,8 +110,9 @@ typedef struct is31fl3733_led_t { uint8_t b; } __attribute__((packed)) is31fl3733_led_t; -extern const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT]; +extern const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT]; +void is31fl3733_init_drivers(void); void is31fl3733_init(uint8_t addr, uint8_t sync); bool is31fl3733_write_register(uint8_t addr, uint8_t reg, uint8_t data); bool is31fl3733_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer); @@ -144,6 +145,10 @@ void is31fl3733_flush(void); #define IS31FL3733_PWM_FREQUENCY_2K1_HZ 0b011 #define IS31FL3733_PWM_FREQUENCY_1K05_HZ 0b100 +#define IS31FL3733_SYNC_NONE 0b00 +#define IS31FL3733_SYNC_MASTER 0b01 +#define IS31FL3733_SYNC_SLAVE 0b10 + #define A_1 0x00 #define A_2 0x01 #define A_3 0x02 diff --git a/drivers/led/issi/is31fl3736-simple.c b/drivers/led/issi/is31fl3736-simple.c index d8262c3416..2876533819 100644 --- a/drivers/led/issi/is31fl3736-simple.c +++ b/drivers/led/issi/is31fl3736-simple.c @@ -112,6 +112,36 @@ void is31fl3736_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) { } } +void is31fl3736_init_drivers(void) { + i2c_init(); + + is31fl3736_init(IS31FL3736_I2C_ADDRESS_1); +#if defined(IS31FL3736_I2C_ADDRESS_2) + is31fl3736_init(IS31FL3736_I2C_ADDRESS_2); +# if defined(IS31FL3736_I2C_ADDRESS_3) + is31fl3736_init(IS31FL3736_I2C_ADDRESS_3); +# if defined(IS31FL3736_I2C_ADDRESS_4) + is31fl3736_init(IS31FL3736_I2C_ADDRESS_4); +# endif +# endif +#endif + + for (int i = 0; i < IS31FL3736_LED_COUNT; i++) { + is31fl3736_set_led_control_register(i, true); + } + + is31fl3736_update_led_control_registers(IS31FL3736_I2C_ADDRESS_1, 0); +#if defined(IS31FL3736_I2C_ADDRESS_2) + is31fl3736_update_led_control_registers(IS31FL3736_I2C_ADDRESS_2, 1); +# if defined(IS31FL3736_I2C_ADDRESS_3) + is31fl3736_update_led_control_registers(IS31FL3736_I2C_ADDRESS_3, 2); +# if defined(IS31FL3736_I2C_ADDRESS_4) + is31fl3736_update_led_control_registers(IS31FL3736_I2C_ADDRESS_4, 3); +# endif +# endif +#endif +} + void is31fl3736_init(uint8_t addr) { // In order to avoid the LEDs being driven with garbage data // in the LED driver's PWM registers, shutdown is enabled last. @@ -159,7 +189,7 @@ void is31fl3736_init(uint8_t addr) { void is31fl3736_set_value(int index, uint8_t value) { is31fl3736_led_t led; - if (index >= 0 && index < LED_MATRIX_LED_COUNT) { + if (index >= 0 && index < IS31FL3736_LED_COUNT) { memcpy_P(&led, (&g_is31fl3736_leds[index]), sizeof(led)); if (g_pwm_buffer[led.driver][led.v] == value) { @@ -171,7 +201,7 @@ void is31fl3736_set_value(int index, uint8_t value) { } void is31fl3736_set_value_all(uint8_t value) { - for (int i = 0; i < LED_MATRIX_LED_COUNT; i++) { + for (int i = 0; i < IS31FL3736_LED_COUNT; i++) { is31fl3736_set_value(i, value); } } diff --git a/drivers/led/issi/is31fl3736-simple.h b/drivers/led/issi/is31fl3736-simple.h index fe3cec9564..88422ec3a4 100644 --- a/drivers/led/issi/is31fl3736-simple.h +++ b/drivers/led/issi/is31fl3736-simple.h @@ -80,8 +80,9 @@ typedef struct is31fl3736_led_t { uint8_t v; } __attribute__((packed)) is31fl3736_led_t; -extern const is31fl3736_led_t PROGMEM g_is31fl3736_leds[LED_MATRIX_LED_COUNT]; +extern const is31fl3736_led_t PROGMEM g_is31fl3736_leds[IS31FL3736_LED_COUNT]; +void is31fl3736_init_drivers(void); void is31fl3736_init(uint8_t addr); void is31fl3736_write_register(uint8_t addr, uint8_t reg, uint8_t data); void is31fl3736_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer); diff --git a/drivers/led/issi/is31fl3736.c b/drivers/led/issi/is31fl3736.c index 4edf1b04c8..ad421e5cf2 100644 --- a/drivers/led/issi/is31fl3736.c +++ b/drivers/led/issi/is31fl3736.c @@ -112,6 +112,36 @@ void is31fl3736_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) { } } +void is31fl3736_init_drivers(void) { + i2c_init(); + + is31fl3736_init(IS31FL3736_I2C_ADDRESS_1); +#if defined(IS31FL3736_I2C_ADDRESS_2) + is31fl3736_init(IS31FL3736_I2C_ADDRESS_2); +# if defined(IS31FL3736_I2C_ADDRESS_3) + is31fl3736_init(IS31FL3736_I2C_ADDRESS_3); +# if defined(IS31FL3736_I2C_ADDRESS_4) + is31fl3736_init(IS31FL3736_I2C_ADDRESS_4); +# endif +# endif +#endif + + for (int i = 0; i < IS31FL3736_LED_COUNT; i++) { + is31fl3736_set_led_control_register(i, true, true, true); + } + + is31fl3736_update_led_control_registers(IS31FL3736_I2C_ADDRESS_1, 0); +#if defined(IS31FL3736_I2C_ADDRESS_2) + is31fl3736_update_led_control_registers(IS31FL3736_I2C_ADDRESS_2, 1); +# if defined(IS31FL3736_I2C_ADDRESS_3) + is31fl3736_update_led_control_registers(IS31FL3736_I2C_ADDRESS_3, 2); +# if defined(IS31FL3736_I2C_ADDRESS_4) + is31fl3736_update_led_control_registers(IS31FL3736_I2C_ADDRESS_4, 3); +# endif +# endif +#endif +} + void is31fl3736_init(uint8_t addr) { // In order to avoid the LEDs being driven with garbage data // in the LED driver's PWM registers, shutdown is enabled last. @@ -159,7 +189,7 @@ void is31fl3736_init(uint8_t addr) { void is31fl3736_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { is31fl3736_led_t led; - if (index >= 0 && index < RGB_MATRIX_LED_COUNT) { + if (index >= 0 && index < IS31FL3736_LED_COUNT) { memcpy_P(&led, (&g_is31fl3736_leds[index]), sizeof(led)); if (g_pwm_buffer[led.driver][led.r] == red && g_pwm_buffer[led.driver][led.g] == green && g_pwm_buffer[led.driver][led.b] == blue) { @@ -173,7 +203,7 @@ void is31fl3736_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { } void is31fl3736_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { - for (int i = 0; i < RGB_MATRIX_LED_COUNT; i++) { + for (int i = 0; i < IS31FL3736_LED_COUNT; i++) { is31fl3736_set_color(i, red, green, blue); } } diff --git a/drivers/led/issi/is31fl3736.h b/drivers/led/issi/is31fl3736.h index 728021ae29..b64fdf9d1c 100644 --- a/drivers/led/issi/is31fl3736.h +++ b/drivers/led/issi/is31fl3736.h @@ -94,8 +94,9 @@ typedef struct is31fl3736_led_t { uint8_t b; } __attribute__((packed)) is31fl3736_led_t; -extern const is31fl3736_led_t PROGMEM g_is31fl3736_leds[RGB_MATRIX_LED_COUNT]; +extern const is31fl3736_led_t PROGMEM g_is31fl3736_leds[IS31FL3736_LED_COUNT]; +void is31fl3736_init_drivers(void); void is31fl3736_init(uint8_t addr); void is31fl3736_write_register(uint8_t addr, uint8_t reg, uint8_t data); void is31fl3736_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer); diff --git a/drivers/led/issi/is31fl3737-simple.c b/drivers/led/issi/is31fl3737-simple.c index 7a4263d9af..aa6eba982c 100644 --- a/drivers/led/issi/is31fl3737-simple.c +++ b/drivers/led/issi/is31fl3737-simple.c @@ -115,6 +115,36 @@ void is31fl3737_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) { } } +void is31fl3737_init_drivers(void) { + i2c_init(); + + is31fl3737_init(IS31FL3737_I2C_ADDRESS_1); +#if defined(IS31FL3737_I2C_ADDRESS_2) + is31fl3737_init(IS31FL3737_I2C_ADDRESS_2); +# if defined(IS31FL3737_I2C_ADDRESS_3) + is31fl3737_init(IS31FL3737_I2C_ADDRESS_3); +# if defined(IS31FL3737_I2C_ADDRESS_4) + is31fl3737_init(IS31FL3737_I2C_ADDRESS_4); +# endif +# endif +#endif + + for (int i = 0; i < IS31FL3737_LED_COUNT; i++) { + is31fl3737_set_led_control_register(i, true); + } + + is31fl3737_update_led_control_registers(IS31FL3737_I2C_ADDRESS_1, 0); +#if defined(IS31FL3737_I2C_ADDRESS_2) + is31fl3737_update_led_control_registers(IS31FL3737_I2C_ADDRESS_2, 1); +# if defined(IS31FL3737_I2C_ADDRESS_3) + is31fl3737_update_led_control_registers(IS31FL3737_I2C_ADDRESS_3, 2); +# if defined(IS31FL3737_I2C_ADDRESS_4) + is31fl3737_update_led_control_registers(IS31FL3737_I2C_ADDRESS_4, 3); +# endif +# endif +#endif +} + void is31fl3737_init(uint8_t addr) { // In order to avoid the LEDs being driven with garbage data // in the LED driver's PWM registers, shutdown is enabled last. @@ -162,7 +192,7 @@ void is31fl3737_init(uint8_t addr) { void is31fl3737_set_value(int index, uint8_t value) { is31fl3737_led_t led; - if (index >= 0 && index < LED_MATRIX_LED_COUNT) { + if (index >= 0 && index < IS31FL3737_LED_COUNT) { memcpy_P(&led, (&g_is31fl3737_leds[index]), sizeof(led)); if (g_pwm_buffer[led.driver][led.v] == value) { @@ -174,7 +204,7 @@ void is31fl3737_set_value(int index, uint8_t value) { } void is31fl3737_set_value_all(uint8_t value) { - for (int i = 0; i < LED_MATRIX_LED_COUNT; i++) { + for (int i = 0; i < IS31FL3737_LED_COUNT; i++) { is31fl3737_set_value(i, value); } } diff --git a/drivers/led/issi/is31fl3737-simple.h b/drivers/led/issi/is31fl3737-simple.h index b177d4fb0a..4c7af02176 100644 --- a/drivers/led/issi/is31fl3737-simple.h +++ b/drivers/led/issi/is31fl3737-simple.h @@ -70,8 +70,9 @@ typedef struct is31fl3737_led_t { uint8_t v; } __attribute__((packed)) is31fl3737_led_t; -extern const is31fl3737_led_t PROGMEM g_is31fl3737_leds[LED_MATRIX_LED_COUNT]; +extern const is31fl3737_led_t PROGMEM g_is31fl3737_leds[IS31FL3737_LED_COUNT]; +void is31fl3737_init_drivers(void); void is31fl3737_init(uint8_t addr); void is31fl3737_write_register(uint8_t addr, uint8_t reg, uint8_t data); void is31fl3737_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer); diff --git a/drivers/led/issi/is31fl3737.c b/drivers/led/issi/is31fl3737.c index d769bb9707..75544231ec 100644 --- a/drivers/led/issi/is31fl3737.c +++ b/drivers/led/issi/is31fl3737.c @@ -115,6 +115,36 @@ void is31fl3737_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) { } } +void is31fl3737_init_drivers(void) { + i2c_init(); + + is31fl3737_init(IS31FL3737_I2C_ADDRESS_1); +#if defined(IS31FL3737_I2C_ADDRESS_2) + is31fl3737_init(IS31FL3737_I2C_ADDRESS_2); +# if defined(IS31FL3737_I2C_ADDRESS_3) + is31fl3737_init(IS31FL3737_I2C_ADDRESS_3); +# if defined(IS31FL3737_I2C_ADDRESS_4) + is31fl3737_init(IS31FL3737_I2C_ADDRESS_4); +# endif +# endif +#endif + + for (int i = 0; i < IS31FL3737_LED_COUNT; i++) { + is31fl3737_set_led_control_register(i, true, true, true); + } + + is31fl3737_update_led_control_registers(IS31FL3737_I2C_ADDRESS_1, 0); +#if defined(IS31FL3737_I2C_ADDRESS_2) + is31fl3737_update_led_control_registers(IS31FL3737_I2C_ADDRESS_2, 1); +# if defined(IS31FL3737_I2C_ADDRESS_3) + is31fl3737_update_led_control_registers(IS31FL3737_I2C_ADDRESS_3, 2); +# if defined(IS31FL3737_I2C_ADDRESS_4) + is31fl3737_update_led_control_registers(IS31FL3737_I2C_ADDRESS_4, 3); +# endif +# endif +#endif +} + void is31fl3737_init(uint8_t addr) { // In order to avoid the LEDs being driven with garbage data // in the LED driver's PWM registers, shutdown is enabled last. @@ -162,7 +192,7 @@ void is31fl3737_init(uint8_t addr) { void is31fl3737_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { is31fl3737_led_t led; - if (index >= 0 && index < RGB_MATRIX_LED_COUNT) { + if (index >= 0 && index < IS31FL3737_LED_COUNT) { memcpy_P(&led, (&g_is31fl3737_leds[index]), sizeof(led)); if (g_pwm_buffer[led.driver][led.r] == red && g_pwm_buffer[led.driver][led.g] == green && g_pwm_buffer[led.driver][led.b] == blue) { @@ -176,7 +206,7 @@ void is31fl3737_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { } void is31fl3737_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { - for (int i = 0; i < RGB_MATRIX_LED_COUNT; i++) { + for (int i = 0; i < IS31FL3737_LED_COUNT; i++) { is31fl3737_set_color(i, red, green, blue); } } diff --git a/drivers/led/issi/is31fl3737.h b/drivers/led/issi/is31fl3737.h index 12f84e3bfe..fadab70c74 100644 --- a/drivers/led/issi/is31fl3737.h +++ b/drivers/led/issi/is31fl3737.h @@ -87,8 +87,9 @@ typedef struct is31fl3737_led_t { uint8_t b; } __attribute__((packed)) is31fl3737_led_t; -extern const is31fl3737_led_t PROGMEM g_is31fl3737_leds[RGB_MATRIX_LED_COUNT]; +extern const is31fl3737_led_t PROGMEM g_is31fl3737_leds[IS31FL3737_LED_COUNT]; +void is31fl3737_init_drivers(void); void is31fl3737_init(uint8_t addr); void is31fl3737_write_register(uint8_t addr, uint8_t reg, uint8_t data); void is31fl3737_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer); diff --git a/drivers/led/issi/is31fl3741-simple.c b/drivers/led/issi/is31fl3741-simple.c index c7335866ec..8e77a6446d 100644 --- a/drivers/led/issi/is31fl3741-simple.c +++ b/drivers/led/issi/is31fl3741-simple.c @@ -143,6 +143,36 @@ bool is31fl3741_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) { return true; } +void is31fl3741_init_drivers(void) { + i2c_init(); + + is31fl3741_init(IS31FL3741_I2C_ADDRESS_1); +#if defined(IS31FL3741_I2C_ADDRESS_2) + is31fl3741_init(IS31FL3741_I2C_ADDRESS_2); +# if defined(IS31FL3741_I2C_ADDRESS_3) + is31fl3741_init(IS31FL3741_I2C_ADDRESS_3); +# if defined(IS31FL3741_I2C_ADDRESS_4) + is31fl3741_init(IS31FL3741_I2C_ADDRESS_4); +# endif +# endif +#endif + + for (int i = 0; i < IS31FL3741_LED_COUNT; i++) { + is31fl3741_set_led_control_register(i, true); + } + + is31fl3741_update_led_control_registers(IS31FL3741_I2C_ADDRESS_1, 0); +#if defined(IS31FL3741_I2C_ADDRESS_2) + is31fl3741_update_led_control_registers(IS31FL3741_I2C_ADDRESS_2, 1); +# if defined(IS31FL3741_I2C_ADDRESS_3) + is31fl3741_update_led_control_registers(IS31FL3741_I2C_ADDRESS_3, 2); +# if defined(IS31FL3741_I2C_ADDRESS_4) + is31fl3741_update_led_control_registers(IS31FL3741_I2C_ADDRESS_4, 3); +# endif +# endif +#endif +} + void is31fl3741_init(uint8_t addr) { // In order to avoid the LEDs being driven with garbage data // in the LED driver's PWM registers, shutdown is enabled last. @@ -174,7 +204,7 @@ void is31fl3741_init(uint8_t addr) { void is31fl3741_set_value(int index, uint8_t value) { is31fl3741_led_t led; - if (index >= 0 && index < LED_MATRIX_LED_COUNT) { + if (index >= 0 && index < IS31FL3741_LED_COUNT) { memcpy_P(&led, (&g_is31fl3741_leds[index]), sizeof(led)); if (g_pwm_buffer[led.driver][led.v] == value) { @@ -186,7 +216,7 @@ void is31fl3741_set_value(int index, uint8_t value) { } void is31fl3741_set_value_all(uint8_t value) { - for (int i = 0; i < LED_MATRIX_LED_COUNT; i++) { + for (int i = 0; i < IS31FL3741_LED_COUNT; i++) { is31fl3741_set_value(i, value); } } diff --git a/drivers/led/issi/is31fl3741-simple.h b/drivers/led/issi/is31fl3741-simple.h index 8ecc330298..d97591fa60 100644 --- a/drivers/led/issi/is31fl3741-simple.h +++ b/drivers/led/issi/is31fl3741-simple.h @@ -70,8 +70,9 @@ typedef struct is31fl3741_led_t { uint32_t v : 10; } __attribute__((packed)) is31fl3741_led_t; -extern const is31fl3741_led_t PROGMEM g_is31fl3741_leds[RGB_MATRIX_LED_COUNT]; +extern const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT]; +void is31fl3741_init_drivers(void); void is31fl3741_init(uint8_t addr); void is31fl3741_write_register(uint8_t addr, uint8_t reg, uint8_t data); bool is31fl3741_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer); diff --git a/drivers/led/issi/is31fl3741.c b/drivers/led/issi/is31fl3741.c index 5e4ed711ca..f316b76157 100644 --- a/drivers/led/issi/is31fl3741.c +++ b/drivers/led/issi/is31fl3741.c @@ -143,6 +143,36 @@ bool is31fl3741_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) { return true; } +void is31fl3741_init_drivers(void) { + i2c_init(); + + is31fl3741_init(IS31FL3741_I2C_ADDRESS_1); +#if defined(IS31FL3741_I2C_ADDRESS_2) + is31fl3741_init(IS31FL3741_I2C_ADDRESS_2); +# if defined(IS31FL3741_I2C_ADDRESS_3) + is31fl3741_init(IS31FL3741_I2C_ADDRESS_3); +# if defined(IS31FL3741_I2C_ADDRESS_4) + is31fl3741_init(IS31FL3741_I2C_ADDRESS_4); +# endif +# endif +#endif + + for (int i = 0; i < IS31FL3741_LED_COUNT; i++) { + is31fl3741_set_led_control_register(i, true, true, true); + } + + is31fl3741_update_led_control_registers(IS31FL3741_I2C_ADDRESS_1, 0); +#if defined(IS31FL3741_I2C_ADDRESS_2) + is31fl3741_update_led_control_registers(IS31FL3741_I2C_ADDRESS_2, 1); +# if defined(IS31FL3741_I2C_ADDRESS_3) + is31fl3741_update_led_control_registers(IS31FL3741_I2C_ADDRESS_3, 2); +# if defined(IS31FL3741_I2C_ADDRESS_4) + is31fl3741_update_led_control_registers(IS31FL3741_I2C_ADDRESS_4, 3); +# endif +# endif +#endif +} + void is31fl3741_init(uint8_t addr) { // In order to avoid the LEDs being driven with garbage data // in the LED driver's PWM registers, shutdown is enabled last. @@ -174,7 +204,7 @@ void is31fl3741_init(uint8_t addr) { void is31fl3741_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { is31fl3741_led_t led; - if (index >= 0 && index < RGB_MATRIX_LED_COUNT) { + if (index >= 0 && index < IS31FL3741_LED_COUNT) { memcpy_P(&led, (&g_is31fl3741_leds[index]), sizeof(led)); if (g_pwm_buffer[led.driver][led.r] == red && g_pwm_buffer[led.driver][led.g] == green && g_pwm_buffer[led.driver][led.b] == blue) { @@ -188,7 +218,7 @@ void is31fl3741_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { } void is31fl3741_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { - for (int i = 0; i < RGB_MATRIX_LED_COUNT; i++) { + for (int i = 0; i < IS31FL3741_LED_COUNT; i++) { is31fl3741_set_color(i, red, green, blue); } } diff --git a/drivers/led/issi/is31fl3741.h b/drivers/led/issi/is31fl3741.h index 13e132efa0..1febb6398b 100644 --- a/drivers/led/issi/is31fl3741.h +++ b/drivers/led/issi/is31fl3741.h @@ -87,8 +87,9 @@ typedef struct is31fl3741_led_t { uint32_t b : 10; } __attribute__((packed)) is31fl3741_led_t; -extern const is31fl3741_led_t PROGMEM g_is31fl3741_leds[RGB_MATRIX_LED_COUNT]; +extern const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT]; +void is31fl3741_init_drivers(void); void is31fl3741_init(uint8_t addr); void is31fl3741_write_register(uint8_t addr, uint8_t reg, uint8_t data); bool is31fl3741_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer); diff --git a/drivers/led/issi/is31flcommon.c b/drivers/led/issi/is31flcommon.c index 850f23c831..d6b9bce93d 100644 --- a/drivers/led/issi/is31flcommon.c +++ b/drivers/led/issi/is31flcommon.c @@ -188,6 +188,41 @@ void IS31FL_common_flush(void) { } #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) { @@ -231,6 +266,41 @@ void IS31FL_RGB_set_scaling_buffer(uint8_t index, bool red, bool green, bool blu #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)); diff --git a/drivers/led/issi/is31flcommon.h b/drivers/led/issi/is31flcommon.h index c380f2a8d6..94ec9ae3ce 100644 --- a/drivers/led/issi/is31flcommon.h +++ b/drivers/led/issi/is31flcommon.h @@ -71,11 +71,13 @@ 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); |