diff options
Diffstat (limited to 'keyboards/kprepublic/bm60hsrgb_poker')
-rw-r--r-- | keyboards/kprepublic/bm60hsrgb_poker/rev2/config.h | 4 | ||||
-rw-r--r-- | keyboards/kprepublic/bm60hsrgb_poker/rev2/rev2.c | 14 |
2 files changed, 9 insertions, 9 deletions
diff --git a/keyboards/kprepublic/bm60hsrgb_poker/rev2/config.h b/keyboards/kprepublic/bm60hsrgb_poker/rev2/config.h index 7fd7575148..57cb40dc24 100644 --- a/keyboards/kprepublic/bm60hsrgb_poker/rev2/config.h +++ b/keyboards/kprepublic/bm60hsrgb_poker/rev2/config.h @@ -81,7 +81,7 @@ #define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND #define DRIVER_1_LED_TOTAL 61 -#define ISSI_LED_TOTAL DRIVER_1_LED_TOTAL +#define IS31FL3733_LED_COUNT DRIVER_1_LED_TOTAL // Underglow LEDs are WS2812, but someone might want to use RGBLIGHT for them; // don't use those LEDs in RGB Matrix in that case. @@ -91,7 +91,7 @@ # define WS2812_LED_TOTAL 6 #endif -#define RGB_MATRIX_LED_COUNT (ISSI_LED_TOTAL + WS2812_LED_TOTAL) +#define RGB_MATRIX_LED_COUNT (IS31FL3733_LED_COUNT + WS2812_LED_TOTAL) #ifdef RGB_MATRIX_ENABLE # define RGB_MATRIX_KEYPRESSES diff --git a/keyboards/kprepublic/bm60hsrgb_poker/rev2/rev2.c b/keyboards/kprepublic/bm60hsrgb_poker/rev2/rev2.c index f76c45e6c5..2e66a3096e 100644 --- a/keyboards/kprepublic/bm60hsrgb_poker/rev2/rev2.c +++ b/keyboards/kprepublic/bm60hsrgb_poker/rev2/rev2.c @@ -21,7 +21,7 @@ # include "is31fl3733.h" # include "ws2812.h" -const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = { +const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { { 0, B_1, A_1, C_1 }, { 0, B_2, A_2, C_2 }, { 0, B_3, A_3, C_3 }, @@ -149,8 +149,8 @@ rgb_led_t rgb_matrix_ws2812_array[WS2812_LED_TOTAL]; static void rgb_matrix_driver_init(void) { i2c_init(); - is31fl3733_init(IS31FL3733_I2C_ADDRESS_1, 0); - for (uint8_t index = 0; index < ISSI_LED_TOTAL; index++) { + is31fl3733_init(IS31FL3733_I2C_ADDRESS_1, IS31FL3733_SYNC_NONE); + for (uint8_t index = 0; index < IS31FL3733_LED_COUNT; index++) { bool enabled = true; is31fl3733_set_led_control_register(index, enabled, enabled, enabled); } @@ -165,13 +165,13 @@ static void rgb_matrix_driver_flush(void) { } static void rgb_matrix_driver_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { - if (index < ISSI_LED_TOTAL) { + if (index < IS31FL3733_LED_COUNT) { is31fl3733_set_color(index, red, green, blue); } else { # if WS2812_LED_TOTAL > 0 - rgb_matrix_ws2812_array[index - ISSI_LED_TOTAL].r = red; - rgb_matrix_ws2812_array[index - ISSI_LED_TOTAL].g = green; - rgb_matrix_ws2812_array[index - ISSI_LED_TOTAL].b = blue; + rgb_matrix_ws2812_array[index - IS31FL3733_LED_COUNT].r = red; + rgb_matrix_ws2812_array[index - IS31FL3733_LED_COUNT].g = green; + rgb_matrix_ws2812_array[index - IS31FL3733_LED_COUNT].b = blue; # endif } } |