X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=quantum%2Frgb_matrix_drivers.c;h=4d8f05892cdf750ccf5e5e55fe2f8a72fabab6d6;hb=7ec583e5efb276ce90a40a1df985de7d0d0b8f46;hp=3b7d58483ab32d727fffbd21166122a89294fa24;hpb=fa4052c26e33b42b65521fd5ba9f94a3a778b275;p=qmk_firmware.git diff --git a/quantum/rgb_matrix_drivers.c b/quantum/rgb_matrix_drivers.c index 3b7d58483..4d8f05892 100644 --- a/quantum/rgb_matrix_drivers.c +++ b/quantum/rgb_matrix_drivers.c @@ -34,7 +34,7 @@ static void init( void ) IS31FL3731_init( DRIVER_ADDR_1 ); IS31FL3731_init( DRIVER_ADDR_2 ); #elif defined(IS31FL3733) - IS31FL3733_init( DRIVER_ADDR_1 ); + IS31FL3733_init( DRIVER_ADDR_1, 0 ); #else IS31FL3737_init( DRIVER_ADDR_1 ); #endif @@ -51,9 +51,11 @@ static void init( void ) } // This actually updates the LED drivers #ifdef IS31FL3731 - IS31FL3731_update_led_control_registers( DRIVER_ADDR_1, DRIVER_ADDR_2 ); + IS31FL3731_update_led_control_registers( DRIVER_ADDR_1, 0 ); + IS31FL3731_update_led_control_registers( DRIVER_ADDR_2, 1 ); #elif defined(IS31FL3733) - IS31FL3733_update_led_control_registers( DRIVER_ADDR_1, DRIVER_ADDR_2 ); + IS31FL3733_update_led_control_registers( DRIVER_ADDR_1, 0 ); + IS31FL3733_update_led_control_registers( DRIVER_ADDR_2, 1 ); #else IS31FL3737_update_led_control_registers( DRIVER_ADDR_1, DRIVER_ADDR_2 ); #endif @@ -62,7 +64,8 @@ static void init( void ) #ifdef IS31FL3731 static void flush( void ) { - IS31FL3731_update_pwm_buffers( DRIVER_ADDR_1, DRIVER_ADDR_2 ); + IS31FL3731_update_pwm_buffers( DRIVER_ADDR_1, 0 ); + IS31FL3731_update_pwm_buffers( DRIVER_ADDR_2, 1 ); } const rgb_matrix_driver_t rgb_matrix_driver = { @@ -74,7 +77,8 @@ const rgb_matrix_driver_t rgb_matrix_driver = { #elif defined(IS31FL3733) static void flush( void ) { - IS31FL3733_update_pwm_buffers( DRIVER_ADDR_1, DRIVER_ADDR_2 ); + IS31FL3733_update_pwm_buffers( DRIVER_ADDR_1, 0); + IS31FL3733_update_pwm_buffers( DRIVER_ADDR_2, 1); } const rgb_matrix_driver_t rgb_matrix_driver = { @@ -97,4 +101,25 @@ const rgb_matrix_driver_t rgb_matrix_driver = { }; #endif +#elif defined(WS2812) + +extern LED_TYPE led[DRIVER_LED_TOTAL]; + + static void flush( void ) + { + // Assumes use of RGB_DI_PIN + ws2812_setleds(led, DRIVER_LED_TOTAL); + } + + static void init( void ) + { + + } + + const rgb_matrix_driver_t rgb_matrix_driver = { + .init = init, + .flush = flush, + .set_color = ws2812_setled, + .set_color_all = ws2812_setled_all, + }; #endif