1
0
Fork 0

Add support for 4 IS31FL3731 devices (#10860)

This is a simple change.Support for IS31FL3731 has been changed from 2 to 4.
This commit is contained in:
X-Bows Tech 2020-11-06 03:58:46 +08:00 committed by GitHub
parent f12dcb0659
commit f2eb080aa2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -34,6 +34,12 @@ static void init(void) {
# ifdef DRIVER_ADDR_2 # ifdef DRIVER_ADDR_2
IS31FL3731_init(DRIVER_ADDR_2); IS31FL3731_init(DRIVER_ADDR_2);
# endif # endif
# ifdef DRIVER_ADDR_3
IS31FL3731_init(DRIVER_ADDR_3);
# endif
# ifdef DRIVER_ADDR_4
IS31FL3731_init(DRIVER_ADDR_4);
# endif
# elif defined(IS31FL3733) # elif defined(IS31FL3733)
IS31FL3733_init(DRIVER_ADDR_1, 0); IS31FL3733_init(DRIVER_ADDR_1, 0);
# elif defined(IS31FL3737) # elif defined(IS31FL3737)
@ -60,6 +66,12 @@ static void init(void) {
# ifdef DRIVER_ADDR_2 # ifdef DRIVER_ADDR_2
IS31FL3731_update_led_control_registers(DRIVER_ADDR_2, 1); IS31FL3731_update_led_control_registers(DRIVER_ADDR_2, 1);
# endif # 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) # elif defined(IS31FL3733)
IS31FL3733_update_led_control_registers(DRIVER_ADDR_1, 0); IS31FL3733_update_led_control_registers(DRIVER_ADDR_1, 0);
IS31FL3733_update_led_control_registers(DRIVER_ADDR_2, 1); IS31FL3733_update_led_control_registers(DRIVER_ADDR_2, 1);
@ -76,6 +88,12 @@ static void flush(void) {
# ifdef DRIVER_ADDR_2 # ifdef DRIVER_ADDR_2
IS31FL3731_update_pwm_buffers(DRIVER_ADDR_2, 1); IS31FL3731_update_pwm_buffers(DRIVER_ADDR_2, 1);
# endif # 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 = { const rgb_matrix_driver_t rgb_matrix_driver = {