summaryrefslogtreecommitdiff
path: root/keyboards/kprepublic
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2023-11-01 11:53:45 +1100
committerGitHub <noreply@github.com>2023-11-01 00:53:45 +0000
commitb52aca0af83fade24c56b4bb7369f18183123bd3 (patch)
tree9b553c4b771717cc334f3c8683052bc701472c4d /keyboards/kprepublic
parenteac8e6788871a087eafdc5492eee425a7205d727 (diff)
Relocate LED driver init code (#22365)
Diffstat (limited to 'keyboards/kprepublic')
-rw-r--r--keyboards/kprepublic/bm60hsrgb/rev2/config.h4
-rw-r--r--keyboards/kprepublic/bm60hsrgb/rev2/rev2.c14
-rw-r--r--keyboards/kprepublic/bm60hsrgb_iso/rev2/config.h4
-rw-r--r--keyboards/kprepublic/bm60hsrgb_iso/rev2/rev2.c14
-rw-r--r--keyboards/kprepublic/bm60hsrgb_poker/rev2/config.h4
-rw-r--r--keyboards/kprepublic/bm60hsrgb_poker/rev2/rev2.c14
6 files changed, 27 insertions, 27 deletions
diff --git a/keyboards/kprepublic/bm60hsrgb/rev2/config.h b/keyboards/kprepublic/bm60hsrgb/rev2/config.h
index 9349838622..8d194f5ccb 100644
--- a/keyboards/kprepublic/bm60hsrgb/rev2/config.h
+++ b/keyboards/kprepublic/bm60hsrgb/rev2/config.h
@@ -74,7 +74,7 @@
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120
-#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.
@@ -84,7 +84,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/rev2/rev2.c b/keyboards/kprepublic/bm60hsrgb/rev2/rev2.c
index 8b786d7cfb..0e9b3d318d 100644
--- a/keyboards/kprepublic/bm60hsrgb/rev2/rev2.c
+++ b/keyboards/kprepublic/bm60hsrgb/rev2/rev2.c
@@ -22,7 +22,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 },
@@ -153,8 +153,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);
}
@@ -169,13 +169,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
}
}
diff --git a/keyboards/kprepublic/bm60hsrgb_iso/rev2/config.h b/keyboards/kprepublic/bm60hsrgb_iso/rev2/config.h
index acd30f0659..b22c384460 100644
--- a/keyboards/kprepublic/bm60hsrgb_iso/rev2/config.h
+++ b/keyboards/kprepublic/bm60hsrgb_iso/rev2/config.h
@@ -82,7 +82,7 @@
// IS31FL3733+WS2812 driver setup used by this board the LED controller drivers
// are compiled unconditionally).
-#define ISSI_LED_TOTAL DRIVER_1_LED_TOTAL
+#define IS31FL3733_LED_COUNT DRIVER_1_LED_TOTAL
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180
@@ -94,7 +94,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_iso/rev2/rev2.c b/keyboards/kprepublic/bm60hsrgb_iso/rev2/rev2.c
index 02dd4ab6ce..2cfe18e08e 100644
--- a/keyboards/kprepublic/bm60hsrgb_iso/rev2/rev2.c
+++ b/keyboards/kprepublic/bm60hsrgb_iso/rev2/rev2.c
@@ -24,7 +24,7 @@
# include "ws2812.h"
-const PROGMEM is31fl3733_led_t g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
+const PROGMEM is31fl3733_led_t 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 },
@@ -153,8 +153,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);
}
@@ -169,13 +169,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
}
}
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
}
}