summaryrefslogtreecommitdiff
path: root/keyboards/kprepublic/bm60hsrgb_iso
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2023-11-28 16:39:48 +1100
committerNick Brassel <nick@tzarc.org>2023-11-28 16:40:47 +1100
commit0115951de12bd4c798a43a380651c34552552e85 (patch)
tree62999011ae782d93aa6dc9c889615db2a840cafc /keyboards/kprepublic/bm60hsrgb_iso
parent0379d1f59e58cefa18cdb72ba1b77507d1108ae6 (diff)
parent4d99e0a23cff02f4c6e55e093b5de08a9be0df7c (diff)
`develop` -> `master`, 2023q4 edition
Diffstat (limited to 'keyboards/kprepublic/bm60hsrgb_iso')
-rw-r--r--keyboards/kprepublic/bm60hsrgb_iso/rev2/config.h7
-rw-r--r--keyboards/kprepublic/bm60hsrgb_iso/rev2/rev2.c20
-rw-r--r--keyboards/kprepublic/bm60hsrgb_iso/rev2/rules.mk2
3 files changed, 14 insertions, 15 deletions
diff --git a/keyboards/kprepublic/bm60hsrgb_iso/rev2/config.h b/keyboards/kprepublic/bm60hsrgb_iso/rev2/config.h
index 8ad699ed9a..00d55f8ee0 100644
--- a/keyboards/kprepublic/bm60hsrgb_iso/rev2/config.h
+++ b/keyboards/kprepublic/bm60hsrgb_iso/rev2/config.h
@@ -26,8 +26,7 @@
# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
# define DISABLE_RGB_MATRIX_RAINDROPS
# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
-# define DRIVER_ADDR_1 0b1010000
-# define DRIVER_COUNT 1
+# define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND
# define DRIVER_1_LED_TOTAL 64
@@ -82,7 +81,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 +93,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 c4ac03e447..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 is31_led g_is31_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 },
@@ -148,34 +148,34 @@ bool rgb_matrix_indicators_kb(void) {
// ==========================================================================
# if WS2812_LED_TOTAL > 0
-LED_TYPE rgb_matrix_ws2812_array[WS2812_LED_TOTAL];
+rgb_led_t rgb_matrix_ws2812_array[WS2812_LED_TOTAL];
# endif
static void rgb_matrix_driver_init(void) {
i2c_init();
- is31fl3733_init(DRIVER_ADDR_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);
}
- is31fl3733_update_led_control_registers(DRIVER_ADDR_1, 0);
+ is31fl3733_update_led_control_registers(IS31FL3733_I2C_ADDRESS_1, 0);
}
static void rgb_matrix_driver_flush(void) {
- is31fl3733_update_pwm_buffers(DRIVER_ADDR_1, 0);
+ is31fl3733_update_pwm_buffers(IS31FL3733_I2C_ADDRESS_1, 0);
# if WS2812_LED_TOTAL > 0
ws2812_setleds(rgb_matrix_ws2812_array, WS2812_LED_TOTAL);
# endif
}
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/rules.mk b/keyboards/kprepublic/bm60hsrgb_iso/rev2/rules.mk
index b6b9ff1110..d84cbc0bf1 100644
--- a/keyboards/kprepublic/bm60hsrgb_iso/rev2/rules.mk
+++ b/keyboards/kprepublic/bm60hsrgb_iso/rev2/rules.mk
@@ -20,5 +20,5 @@ RGB_MATRIX_ENABLE = yes
# here manually.
COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31fl3733.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
WS2812_DRIVER_REQUIRED = yes