Skip to content

Commit

Permalink
Allow the use of a single IS31FL3731 LED driver
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdremily committed Sep 23, 2020
1 parent 2012b9c commit 06e3d1f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions quantum/rgb_matrix_drivers.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ static void init(void) {
i2c_init();
# ifdef IS31FL3731
IS31FL3731_init(DRIVER_ADDR_1);
# ifdef DRIVER_ADDR_2
IS31FL3731_init(DRIVER_ADDR_2);
# endif
# elif defined(IS31FL3733)
IS31FL3733_init(DRIVER_ADDR_1, 0);
# elif defined(IS31FL3737)
Expand All @@ -55,7 +57,9 @@ static void init(void) {
// This actually updates the LED drivers
# ifdef IS31FL3731
IS31FL3731_update_led_control_registers(DRIVER_ADDR_1, 0);
# ifdef DRIVER_ADDR_2
IS31FL3731_update_led_control_registers(DRIVER_ADDR_2, 1);
# endif
# elif defined(IS31FL3733)
IS31FL3733_update_led_control_registers(DRIVER_ADDR_1, 0);
IS31FL3733_update_led_control_registers(DRIVER_ADDR_2, 1);
Expand All @@ -69,7 +73,9 @@ static void init(void) {
# ifdef IS31FL3731
static void flush(void) {
IS31FL3731_update_pwm_buffers(DRIVER_ADDR_1, 0);
# ifdef DRIVER_ADDR_2
IS31FL3731_update_pwm_buffers(DRIVER_ADDR_2, 1);
# endif
}

const rgb_matrix_driver_t rgb_matrix_driver = {
Expand Down

0 comments on commit 06e3d1f

Please sign in to comment.