Skip to content

Commit

Permalink
Add support for 4 IS31FL3731 devices (#10860)
Browse files Browse the repository at this point in the history
This is a simple change.Support for IS31FL3731 has been changed from 2 to 4.
  • Loading branch information
XBowsTech committed Nov 5, 2020
1 parent f12dcb0 commit f2eb080
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions quantum/rgb_matrix_drivers.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ static void init(void) {
# ifdef DRIVER_ADDR_2
IS31FL3731_init(DRIVER_ADDR_2);
# endif
# ifdef DRIVER_ADDR_3
IS31FL3731_init(DRIVER_ADDR_3);
# endif
# ifdef DRIVER_ADDR_4
IS31FL3731_init(DRIVER_ADDR_4);
# endif
# elif defined(IS31FL3733)
IS31FL3733_init(DRIVER_ADDR_1, 0);
# elif defined(IS31FL3737)
Expand All @@ -60,6 +66,12 @@ static void init(void) {
# ifdef DRIVER_ADDR_2
IS31FL3731_update_led_control_registers(DRIVER_ADDR_2, 1);
# endif
# ifdef DRIVER_ADDR_3
IS31FL3731_update_led_control_registers(DRIVER_ADDR_3, 2);
# endif
# ifdef DRIVER_ADDR_4
IS31FL3731_update_led_control_registers(DRIVER_ADDR_4, 3);
# endif
# elif defined(IS31FL3733)
IS31FL3733_update_led_control_registers(DRIVER_ADDR_1, 0);
IS31FL3733_update_led_control_registers(DRIVER_ADDR_2, 1);
Expand All @@ -76,6 +88,12 @@ static void flush(void) {
# ifdef DRIVER_ADDR_2
IS31FL3731_update_pwm_buffers(DRIVER_ADDR_2, 1);
# endif
# ifdef DRIVER_ADDR_3
IS31FL3731_update_pwm_buffers(DRIVER_ADDR_3, 2);
# endif
# ifdef DRIVER_ADDR_4
IS31FL3731_update_pwm_buffers(DRIVER_ADDR_4, 3);
# endif
}

const rgb_matrix_driver_t rgb_matrix_driver = {
Expand Down

0 comments on commit f2eb080

Please sign in to comment.