summaryrefslogtreecommitdiffstats
path: root/quantum/rgb_matrix_drivers.c
diff options
context:
space:
mode:
authorstein3 <stein3@gmail.com>2020-10-06 07:15:41 -0700
committerstein3 <stein3@gmail.com>2020-10-06 07:15:41 -0700
commit2e402741a89c5eec8cf30c966ce6f36d6ec9249b (patch)
tree3592e8c5e6bd19943ae55db7fc02a5f755afbb51 /quantum/rgb_matrix_drivers.c
parent3e5e4f74272c610bb9fa737f674f8e65ed6100ca (diff)
parent2013f6313430b977e557e482d30daa279a46e75d (diff)
Merge branch 'master' into meteor
Diffstat (limited to 'quantum/rgb_matrix_drivers.c')
-rw-r--r--quantum/rgb_matrix_drivers.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/quantum/rgb_matrix_drivers.c b/quantum/rgb_matrix_drivers.c
index 6084d5685c..0685a34753 100644
--- a/quantum/rgb_matrix_drivers.c
+++ b/quantum/rgb_matrix_drivers.c
@@ -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)
@@ -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);
@@ -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 = {
@@ -111,6 +117,10 @@ const rgb_matrix_driver_t rgb_matrix_driver = {
# endif
#elif defined(WS2812)
+# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_CUSTOM_DRIVER)
+# pragma message "Cannot use RGBLIGHT and RGB Matrix using WS2812 at the same time."
+# pragma message "You need to use a custom driver, or re-implement the WS2812 driver to use a different configuration."
+# endif
// LED color buffer
LED_TYPE rgb_matrix_ws2812_array[DRIVER_LED_TOTAL];