diff options
Diffstat (limited to 'quantum/rgb_matrix/rgb_matrix_drivers.c')
-rw-r--r-- | quantum/rgb_matrix/rgb_matrix_drivers.c | 50 |
1 files changed, 48 insertions, 2 deletions
diff --git a/quantum/rgb_matrix/rgb_matrix_drivers.c b/quantum/rgb_matrix/rgb_matrix_drivers.c index 5b81915845..d65121baf4 100644 --- a/quantum/rgb_matrix/rgb_matrix_drivers.c +++ b/quantum/rgb_matrix/rgb_matrix_drivers.c @@ -23,7 +23,7 @@ * be here if shared between boards. */ -#if defined(IS31FL3731) || defined(IS31FL3733) || defined(IS31FL3737) || defined(IS31FL3741) || defined(IS31FLCOMMON) || defined(CKLED2001) +#if defined(IS31FL3731) || defined(IS31FL3733) || defined(IS31FL3736) || defined(IS31FL3737) || defined(IS31FL3741) || defined(IS31FLCOMMON) || defined(CKLED2001) # include "i2c_master.h" // TODO: Remove this at some later date @@ -72,6 +72,18 @@ static void init(void) { # endif # endif +# elif defined(IS31FL3736) + IS31FL3736_init(DRIVER_ADDR_1); +# if defined(DRIVER_ADDR_2) + IS31FL3736_init(DRIVER_ADDR_2); +# if defined(DRIVER_ADDR_3) + IS31FL3736_init(DRIVER_ADDR_3); +# if defined(DRIVER_ADDR_4) + IS31FL3736_init(DRIVER_ADDR_4); +# endif +# endif +# endif + # elif defined(IS31FL3737) IS31FL3737_init(DRIVER_ADDR_1); # if defined(DRIVER_ADDR_2) @@ -120,6 +132,8 @@ static void init(void) { IS31FL3731_set_led_control_register(index, enabled, enabled, enabled); # elif defined(IS31FL3733) IS31FL3733_set_led_control_register(index, enabled, enabled, enabled); +# elif defined(IS31FL3736) + IS31FL3736_set_led_control_register(index, enabled, enabled, enabled); # elif defined(IS31FL3737) IS31FL3737_set_led_control_register(index, enabled, enabled, enabled); # elif defined(IS31FL3741) @@ -156,6 +170,18 @@ static void init(void) { # endif # endif +# elif defined(IS31FL3736) + IS31FL3736_update_led_control_registers(DRIVER_ADDR_1, 0); +# if defined(DRIVER_ADDR_2) + IS31FL3736_update_led_control_registers(DRIVER_ADDR_2, 1); +# if defined(DRIVER_ADDR_3) + IS31FL3736_update_led_control_registers(DRIVER_ADDR_3, 2); +# if defined(DRIVER_ADDR_4) + IS31FL3736_update_led_control_registers(DRIVER_ADDR_4, 3); +# endif +# endif +# endif + # elif defined(IS31FL3737) IS31FL3737_update_led_control_registers(DRIVER_ADDR_1, 0); # if defined(DRIVER_ADDR_2) @@ -242,6 +268,27 @@ const rgb_matrix_driver_t rgb_matrix_driver = { .set_color_all = IS31FL3733_set_color_all, }; +# elif defined(IS31FL3736) +static void flush(void) { + IS31FL3736_update_pwm_buffers(DRIVER_ADDR_1, 0); +# if defined(DRIVER_ADDR_2) + IS31FL3736_update_pwm_buffers(DRIVER_ADDR_2, 1); +# if defined(DRIVER_ADDR_3) + IS31FL3736_update_pwm_buffers(DRIVER_ADDR_3, 2); +# if defined(DRIVER_ADDR_4) + IS31FL3736_update_pwm_buffers(DRIVER_ADDR_4, 3); +# endif +# endif +# endif +} + +const rgb_matrix_driver_t rgb_matrix_driver = { + .init = init, + .flush = flush, + .set_color = IS31FL3736_set_color, + .set_color_all = IS31FL3736_set_color_all, +}; + # elif defined(IS31FL3737) static void flush(void) { IS31FL3737_update_pwm_buffers(DRIVER_ADDR_1, 0); @@ -359,7 +406,6 @@ LED_TYPE rgb_matrix_ws2812_array[RGB_MATRIX_LED_COUNT]; static void init(void) {} static void flush(void) { - // Assumes use of RGB_DI_PIN ws2812_setleds(rgb_matrix_ws2812_array, RGB_MATRIX_LED_COUNT); } |