diff --git a/drivers/led/issi/is31fl3218-mono.c b/drivers/led/issi/is31fl3218-mono.c
index 5d3c22d7d91..cb5a0691600 100644
--- a/drivers/led/issi/is31fl3218-mono.c
+++ b/drivers/led/issi/is31fl3218-mono.c
@@ -16,6 +16,7 @@
#include "is31fl3218-mono.h"
#include "i2c_master.h"
+#include "gpio.h"
#define IS31FL3218_PWM_REGISTER_COUNT 18
#define IS31FL3218_LED_CONTROL_REGISTER_COUNT 3
@@ -66,6 +67,11 @@ void is31fl3218_write_pwm_buffer(void) {
void is31fl3218_init(void) {
i2c_init();
+#if defined(IS31FL3218_SDB_PIN)
+ setPinOutput(IS31FL3218_SDB_PIN);
+ writePinHigh(IS31FL3218_SDB_PIN);
+#endif
+
// In case we ever want to reinitialize (?)
is31fl3218_write_register(IS31FL3218_REG_RESET, 0x00);
diff --git a/drivers/led/issi/is31fl3218.c b/drivers/led/issi/is31fl3218.c
index c591e22a51e..c3a0946e83c 100644
--- a/drivers/led/issi/is31fl3218.c
+++ b/drivers/led/issi/is31fl3218.c
@@ -16,6 +16,7 @@
#include "is31fl3218.h"
#include "i2c_master.h"
+#include "gpio.h"
#define IS31FL3218_PWM_REGISTER_COUNT 18
#define IS31FL3218_LED_CONTROL_REGISTER_COUNT 3
@@ -66,6 +67,11 @@ void is31fl3218_write_pwm_buffer(void) {
void is31fl3218_init(void) {
i2c_init();
+#if defined(IS31FL3218_SDB_PIN)
+ setPinOutput(IS31FL3218_SDB_PIN);
+ writePinHigh(IS31FL3218_SDB_PIN);
+#endif
+
// In case we ever want to reinitialize (?)
is31fl3218_write_register(IS31FL3218_REG_RESET, 0x00);
diff --git a/drivers/led/issi/is31fl3731-mono.c b/drivers/led/issi/is31fl3731-mono.c
index d3be496ec3b..5ff8f8b7c5d 100644
--- a/drivers/led/issi/is31fl3731-mono.c
+++ b/drivers/led/issi/is31fl3731-mono.c
@@ -19,6 +19,7 @@
#include "is31fl3731-mono.h"
#include "i2c_master.h"
+#include "gpio.h"
#include "wait.h"
#define IS31FL3731_PWM_REGISTER_COUNT 144
@@ -97,6 +98,11 @@ void is31fl3731_write_pwm_buffer(uint8_t index) {
void is31fl3731_init_drivers(void) {
i2c_init();
+#if defined(IS31FL3731_SDB_PIN)
+ setPinOutput(IS31FL3731_SDB_PIN);
+ writePinHigh(IS31FL3731_SDB_PIN);
+#endif
+
for (uint8_t i = 0; i < IS31FL3731_DRIVER_COUNT; i++) {
is31fl3731_init(i);
}
diff --git a/drivers/led/issi/is31fl3731.c b/drivers/led/issi/is31fl3731.c
index 09a4afec900..380861d5b8c 100644
--- a/drivers/led/issi/is31fl3731.c
+++ b/drivers/led/issi/is31fl3731.c
@@ -18,6 +18,7 @@
#include "is31fl3731.h"
#include "i2c_master.h"
+#include "gpio.h"
#include "wait.h"
#define IS31FL3731_PWM_REGISTER_COUNT 144
@@ -96,6 +97,11 @@ void is31fl3731_write_pwm_buffer(uint8_t index) {
void is31fl3731_init_drivers(void) {
i2c_init();
+#if defined(IS31FL3731_SDB_PIN)
+ setPinOutput(IS31FL3731_SDB_PIN);
+ writePinHigh(IS31FL3731_SDB_PIN);
+#endif
+
for (uint8_t i = 0; i < IS31FL3731_DRIVER_COUNT; i++) {
is31fl3731_init(i);
}
diff --git a/drivers/led/issi/is31fl3733-mono.c b/drivers/led/issi/is31fl3733-mono.c
index ecbfa4b7b1b..13f2d9b9831 100644
--- a/drivers/led/issi/is31fl3733-mono.c
+++ b/drivers/led/issi/is31fl3733-mono.c
@@ -20,6 +20,7 @@
#include "is31fl3733-mono.h"
#include "i2c_master.h"
+#include "gpio.h"
#include "wait.h"
#define IS31FL3733_PWM_REGISTER_COUNT 192
@@ -142,6 +143,11 @@ void is31fl3733_write_pwm_buffer(uint8_t index) {
void is31fl3733_init_drivers(void) {
i2c_init();
+#if defined(IS31FL3733_SDB_PIN)
+ setPinOutput(IS31FL3733_SDB_PIN);
+ writePinHigh(IS31FL3733_SDB_PIN);
+#endif
+
for (uint8_t i = 0; i < IS31FL3733_DRIVER_COUNT; i++) {
is31fl3733_init(i);
}
diff --git a/drivers/led/issi/is31fl3733.c b/drivers/led/issi/is31fl3733.c
index 236eed72eb1..ac6f4b4c890 100644
--- a/drivers/led/issi/is31fl3733.c
+++ b/drivers/led/issi/is31fl3733.c
@@ -19,6 +19,7 @@
#include "is31fl3733.h"
#include "i2c_master.h"
+#include "gpio.h"
#include "wait.h"
#define IS31FL3733_PWM_REGISTER_COUNT 192
@@ -141,6 +142,11 @@ void is31fl3733_write_pwm_buffer(uint8_t index) {
void is31fl3733_init_drivers(void) {
i2c_init();
+#if defined(IS31FL3733_SDB_PIN)
+ setPinOutput(IS31FL3733_SDB_PIN);
+ writePinHigh(IS31FL3733_SDB_PIN);
+#endif
+
for (uint8_t i = 0; i < IS31FL3733_DRIVER_COUNT; i++) {
is31fl3733_init(i);
}
diff --git a/drivers/led/issi/is31fl3736-mono.c b/drivers/led/issi/is31fl3736-mono.c
index e1c32797721..0d3b5db4e4c 100644
--- a/drivers/led/issi/is31fl3736-mono.c
+++ b/drivers/led/issi/is31fl3736-mono.c
@@ -17,6 +17,7 @@
#include "is31fl3736-mono.h"
#include "i2c_master.h"
+#include "gpio.h"
#include "wait.h"
#define IS31FL3736_PWM_REGISTER_COUNT 192 // actually 96
@@ -113,6 +114,11 @@ void is31fl3736_write_pwm_buffer(uint8_t index) {
void is31fl3736_init_drivers(void) {
i2c_init();
+#if defined(IS31FL3736_SDB_PIN)
+ setPinOutput(IS31FL3736_SDB_PIN);
+ writePinHigh(IS31FL3736_SDB_PIN);
+#endif
+
for (uint8_t i = 0; i < IS31FL3736_DRIVER_COUNT; i++) {
is31fl3736_init(i);
}
diff --git a/drivers/led/issi/is31fl3736.c b/drivers/led/issi/is31fl3736.c
index 1d14be382dc..990e6c89054 100644
--- a/drivers/led/issi/is31fl3736.c
+++ b/drivers/led/issi/is31fl3736.c
@@ -17,6 +17,7 @@
#include "is31fl3736.h"
#include "i2c_master.h"
+#include "gpio.h"
#include "wait.h"
#define IS31FL3736_PWM_REGISTER_COUNT 192 // actually 96
@@ -113,6 +114,11 @@ void is31fl3736_write_pwm_buffer(uint8_t index) {
void is31fl3736_init_drivers(void) {
i2c_init();
+#if defined(IS31FL3736_SDB_PIN)
+ setPinOutput(IS31FL3736_SDB_PIN);
+ writePinHigh(IS31FL3736_SDB_PIN);
+#endif
+
for (uint8_t i = 0; i < IS31FL3736_DRIVER_COUNT; i++) {
is31fl3736_init(i);
}
diff --git a/drivers/led/issi/is31fl3737-mono.c b/drivers/led/issi/is31fl3737-mono.c
index 11e23acb23e..37d684cff0e 100644
--- a/drivers/led/issi/is31fl3737-mono.c
+++ b/drivers/led/issi/is31fl3737-mono.c
@@ -19,6 +19,7 @@
#include "is31fl3737-mono.h"
#include "i2c_master.h"
+#include "gpio.h"
#include "wait.h"
#define IS31FL3737_PWM_REGISTER_COUNT 192 // actually 144
@@ -115,6 +116,11 @@ void is31fl3737_write_pwm_buffer(uint8_t index) {
void is31fl3737_init_drivers(void) {
i2c_init();
+#if defined(IS31FL3737_SDB_PIN)
+ setPinOutput(IS31FL3737_SDB_PIN);
+ writePinHigh(IS31FL3737_SDB_PIN);
+#endif
+
for (uint8_t i = 0; i < IS31FL3737_DRIVER_COUNT; i++) {
is31fl3737_init(i);
}
diff --git a/drivers/led/issi/is31fl3737.c b/drivers/led/issi/is31fl3737.c
index 2a98d7c3d0d..fb760cda5ee 100644
--- a/drivers/led/issi/is31fl3737.c
+++ b/drivers/led/issi/is31fl3737.c
@@ -19,6 +19,7 @@
#include "is31fl3737.h"
#include "i2c_master.h"
+#include "gpio.h"
#include "wait.h"
#define IS31FL3737_PWM_REGISTER_COUNT 192 // actually 144
@@ -115,6 +116,11 @@ void is31fl3737_write_pwm_buffer(uint8_t index) {
void is31fl3737_init_drivers(void) {
i2c_init();
+#if defined(IS31FL3737_SDB_PIN)
+ setPinOutput(IS31FL3737_SDB_PIN);
+ writePinHigh(IS31FL3737_SDB_PIN);
+#endif
+
for (uint8_t i = 0; i < IS31FL3737_DRIVER_COUNT; i++) {
is31fl3737_init(i);
}
diff --git a/drivers/led/issi/is31fl3741-mono.c b/drivers/led/issi/is31fl3741-mono.c
index 806664d4158..e4857b72d48 100644
--- a/drivers/led/issi/is31fl3741-mono.c
+++ b/drivers/led/issi/is31fl3741-mono.c
@@ -19,6 +19,7 @@
#include "is31fl3741-mono.h"
#include "i2c_master.h"
+#include "gpio.h"
#include "wait.h"
#define IS31FL3741_PWM_0_REGISTER_COUNT 180
@@ -141,6 +142,11 @@ void is31fl3741_write_pwm_buffer(uint8_t index) {
void is31fl3741_init_drivers(void) {
i2c_init();
+#if defined(IS31FL3741_SDB_PIN)
+ setPinOutput(IS31FL3741_SDB_PIN);
+ writePinHigh(IS31FL3741_SDB_PIN);
+#endif
+
for (uint8_t i = 0; i < IS31FL3741_DRIVER_COUNT; i++) {
is31fl3741_init(i);
}
diff --git a/drivers/led/issi/is31fl3741.c b/drivers/led/issi/is31fl3741.c
index 7de649ec915..a6cb661d912 100644
--- a/drivers/led/issi/is31fl3741.c
+++ b/drivers/led/issi/is31fl3741.c
@@ -19,6 +19,7 @@
#include "is31fl3741.h"
#include "i2c_master.h"
+#include "gpio.h"
#include "wait.h"
#define IS31FL3741_PWM_0_REGISTER_COUNT 180
@@ -141,6 +142,11 @@ void is31fl3741_write_pwm_buffer(uint8_t index) {
void is31fl3741_init_drivers(void) {
i2c_init();
+#if defined(IS31FL3741_SDB_PIN)
+ setPinOutput(IS31FL3741_SDB_PIN);
+ writePinHigh(IS31FL3741_SDB_PIN);
+#endif
+
for (uint8_t i = 0; i < IS31FL3741_DRIVER_COUNT; i++) {
is31fl3741_init(i);
}
diff --git a/drivers/led/issi/is31fl3742a-mono.c b/drivers/led/issi/is31fl3742a-mono.c
index 1eebbb72cb1..a33865260c8 100644
--- a/drivers/led/issi/is31fl3742a-mono.c
+++ b/drivers/led/issi/is31fl3742a-mono.c
@@ -20,6 +20,7 @@
#include "is31fl3742a-mono.h"
#include "i2c_master.h"
+#include "gpio.h"
#include "wait.h"
#define IS31FL3742A_PWM_REGISTER_COUNT 180
@@ -114,6 +115,11 @@ void is31fl3742a_write_pwm_buffer(uint8_t index) {
void is31fl3742a_init_drivers(void) {
i2c_init();
+#if defined(IS31FL3742A_SDB_PIN)
+ setPinOutput(IS31FL3742A_SDB_PIN);
+ writePinHigh(IS31FL3742A_SDB_PIN);
+#endif
+
for (uint8_t i = 0; i < IS31FL3742A_DRIVER_COUNT; i++) {
is31fl3742a_init(i);
}
diff --git a/drivers/led/issi/is31fl3742a.c b/drivers/led/issi/is31fl3742a.c
index 4ff08cd75c9..8900ae666fd 100644
--- a/drivers/led/issi/is31fl3742a.c
+++ b/drivers/led/issi/is31fl3742a.c
@@ -20,6 +20,7 @@
#include "is31fl3742a.h"
#include "i2c_master.h"
+#include "gpio.h"
#include "wait.h"
#define IS31FL3742A_PWM_REGISTER_COUNT 180
@@ -114,6 +115,11 @@ void is31fl3742a_write_pwm_buffer(uint8_t index) {
void is31fl3742a_init_drivers(void) {
i2c_init();
+#if defined(IS31FL3742A_SDB_PIN)
+ setPinOutput(IS31FL3742A_SDB_PIN);
+ writePinHigh(IS31FL3742A_SDB_PIN);
+#endif
+
for (uint8_t i = 0; i < IS31FL3742A_DRIVER_COUNT; i++) {
is31fl3742a_init(i);
}
diff --git a/drivers/led/issi/is31fl3743a-mono.c b/drivers/led/issi/is31fl3743a-mono.c
index 3753fb605ce..99b1af160e4 100644
--- a/drivers/led/issi/is31fl3743a-mono.c
+++ b/drivers/led/issi/is31fl3743a-mono.c
@@ -20,6 +20,7 @@
#include "is31fl3743a-mono.h"
#include "i2c_master.h"
+#include "gpio.h"
#include "wait.h"
#define IS31FL3743A_PWM_REGISTER_COUNT 198
@@ -136,6 +137,11 @@ void is31fl3743a_write_pwm_buffer(uint8_t index) {
void is31fl3743a_init_drivers(void) {
i2c_init();
+#if defined(IS31FL3743A_SDB_PIN)
+ setPinOutput(IS31FL3743A_SDB_PIN);
+ writePinHigh(IS31FL3743A_SDB_PIN);
+#endif
+
for (uint8_t i = 0; i < IS31FL3743A_DRIVER_COUNT; i++) {
is31fl3743a_init(i);
}
diff --git a/drivers/led/issi/is31fl3743a.c b/drivers/led/issi/is31fl3743a.c
index eca3dca6b2d..135e20710d4 100644
--- a/drivers/led/issi/is31fl3743a.c
+++ b/drivers/led/issi/is31fl3743a.c
@@ -20,6 +20,7 @@
#include "is31fl3743a.h"
#include "i2c_master.h"
+#include "gpio.h"
#include "wait.h"
#define IS31FL3743A_PWM_REGISTER_COUNT 198
@@ -136,6 +137,11 @@ void is31fl3743a_write_pwm_buffer(uint8_t index) {
void is31fl3743a_init_drivers(void) {
i2c_init();
+#if defined(IS31FL3743A_SDB_PIN)
+ setPinOutput(IS31FL3743A_SDB_PIN);
+ writePinHigh(IS31FL3743A_SDB_PIN);
+#endif
+
for (uint8_t i = 0; i < IS31FL3743A_DRIVER_COUNT; i++) {
is31fl3743a_init(i);
}
diff --git a/drivers/led/issi/is31fl3745-mono.c b/drivers/led/issi/is31fl3745-mono.c
index 8e7a1c522c6..c5d083b272f 100644
--- a/drivers/led/issi/is31fl3745-mono.c
+++ b/drivers/led/issi/is31fl3745-mono.c
@@ -20,6 +20,7 @@
#include "is31fl3745-mono.h"
#include "i2c_master.h"
+#include "gpio.h"
#include "wait.h"
#define IS31FL3745_PWM_REGISTER_COUNT 144
@@ -136,6 +137,11 @@ void is31fl3745_write_pwm_buffer(uint8_t index) {
void is31fl3745_init_drivers(void) {
i2c_init();
+#if defined(IS31FL3745_SDB_PIN)
+ setPinOutput(IS31FL3745_SDB_PIN);
+ writePinHigh(IS31FL3745_SDB_PIN);
+#endif
+
for (uint8_t i = 0; i < IS31FL3745_DRIVER_COUNT; i++) {
is31fl3745_init(i);
}
diff --git a/drivers/led/issi/is31fl3745.c b/drivers/led/issi/is31fl3745.c
index 5f06e340e05..273fddf1d4c 100644
--- a/drivers/led/issi/is31fl3745.c
+++ b/drivers/led/issi/is31fl3745.c
@@ -20,6 +20,7 @@
#include "is31fl3745.h"
#include "i2c_master.h"
+#include "gpio.h"
#include "wait.h"
#define IS31FL3745_PWM_REGISTER_COUNT 144
@@ -136,6 +137,11 @@ void is31fl3745_write_pwm_buffer(uint8_t index) {
void is31fl3745_init_drivers(void) {
i2c_init();
+#if defined(IS31FL3745_SDB_PIN)
+ setPinOutput(IS31FL3745_SDB_PIN);
+ writePinHigh(IS31FL3745_SDB_PIN);
+#endif
+
for (uint8_t i = 0; i < IS31FL3745_DRIVER_COUNT; i++) {
is31fl3745_init(i);
}
diff --git a/drivers/led/issi/is31fl3746a-mono.c b/drivers/led/issi/is31fl3746a-mono.c
index 0c5b72ba2a1..69d50799294 100644
--- a/drivers/led/issi/is31fl3746a-mono.c
+++ b/drivers/led/issi/is31fl3746a-mono.c
@@ -20,6 +20,7 @@
#include "is31fl3746a-mono.h"
#include "i2c_master.h"
+#include "gpio.h"
#include "wait.h"
#define IS31FL3746A_PWM_REGISTER_COUNT 72
@@ -114,6 +115,11 @@ void is31fl3746a_write_pwm_buffer(uint8_t index) {
void is31fl3746a_init_drivers(void) {
i2c_init();
+#if defined(IS31FL3746A_SDB_PIN)
+ setPinOutput(IS31FL3746A_SDB_PIN);
+ writePinHigh(IS31FL3746A_SDB_PIN);
+#endif
+
for (uint8_t i = 0; i < IS31FL3746A_DRIVER_COUNT; i++) {
is31fl3746a_init(i);
}
diff --git a/drivers/led/issi/is31fl3746a.c b/drivers/led/issi/is31fl3746a.c
index 5cdb560594f..c9dfbc5c40f 100644
--- a/drivers/led/issi/is31fl3746a.c
+++ b/drivers/led/issi/is31fl3746a.c
@@ -20,6 +20,7 @@
#include "is31fl3746a.h"
#include "i2c_master.h"
+#include "gpio.h"
#include "wait.h"
#define IS31FL3746A_PWM_REGISTER_COUNT 72
@@ -114,6 +115,11 @@ void is31fl3746a_write_pwm_buffer(uint8_t index) {
void is31fl3746a_init_drivers(void) {
i2c_init();
+#if defined(IS31FL3746A_SDB_PIN)
+ setPinOutput(IS31FL3746A_SDB_PIN);
+ writePinHigh(IS31FL3746A_SDB_PIN);
+#endif
+
for (uint8_t i = 0; i < IS31FL3746A_DRIVER_COUNT; i++) {
is31fl3746a_init(i);
}
diff --git a/drivers/led/snled27351-mono.c b/drivers/led/snled27351-mono.c
index 0c047fa7712..e13fd8a3433 100644
--- a/drivers/led/snled27351-mono.c
+++ b/drivers/led/snled27351-mono.c
@@ -16,6 +16,7 @@
#include "snled27351-mono.h"
#include "i2c_master.h"
+#include "gpio.h"
#define SNLED27351_PWM_REGISTER_COUNT 192
#define SNLED27351_LED_CONTROL_REGISTER_COUNT 24
@@ -103,6 +104,11 @@ void snled27351_write_pwm_buffer(uint8_t index) {
void snled27351_init_drivers(void) {
i2c_init();
+#if defined(SNLED27351_SDB_PIN)
+ setPinOutput(SNLED27351_SDB_PIN);
+ writePinHigh(SNLED27351_SDB_PIN);
+#endif
+
for (uint8_t i = 0; i < SNLED27351_DRIVER_COUNT; i++) {
snled27351_init(i);
}
diff --git a/drivers/led/snled27351.c b/drivers/led/snled27351.c
index 14fb95e165b..293685b01b5 100644
--- a/drivers/led/snled27351.c
+++ b/drivers/led/snled27351.c
@@ -16,6 +16,7 @@
#include "snled27351.h"
#include "i2c_master.h"
+#include "gpio.h"
#define SNLED27351_PWM_REGISTER_COUNT 192
#define SNLED27351_LED_CONTROL_REGISTER_COUNT 24
@@ -103,6 +104,11 @@ void snled27351_write_pwm_buffer(uint8_t index) {
void snled27351_init_drivers(void) {
i2c_init();
+#if defined(SNLED27351_SDB_PIN)
+ setPinOutput(SNLED27351_SDB_PIN);
+ writePinHigh(SNLED27351_SDB_PIN);
+#endif
+
for (uint8_t i = 0; i < SNLED27351_DRIVER_COUNT; i++) {
snled27351_init(i);
}
diff --git a/keyboards/exclusive/e6_rgb/config.h b/keyboards/exclusive/e6_rgb/config.h
index 009c99e2ffb..5baa57c34f0 100644
--- a/keyboards/exclusive/e6_rgb/config.h
+++ b/keyboards/exclusive/e6_rgb/config.h
@@ -5,3 +5,4 @@
#pragma once
#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND
+#define IS31FL3733_SDB_PIN D5
diff --git a/keyboards/exclusive/e6_rgb/e6_rgb.c b/keyboards/exclusive/e6_rgb/e6_rgb.c
index 24676e89100..203e96d64ee 100644
--- a/keyboards/exclusive/e6_rgb/e6_rgb.c
+++ b/keyboards/exclusive/e6_rgb/e6_rgb.c
@@ -1,12 +1,6 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-void matrix_init_kb(void) {
- setPinOutput(D5);
- writePinHigh(D5);
- matrix_init_user();
-}
-
const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
diff --git a/keyboards/input_club/ergodox_infinity/config.h b/keyboards/input_club/ergodox_infinity/config.h
index b8ab5604d4e..bf9ebc980f9 100644
--- a/keyboards/input_club/ergodox_infinity/config.h
+++ b/keyboards/input_club/ergodox_infinity/config.h
@@ -44,6 +44,7 @@ along with this program. If not, see .
/* LED matrix driver */
#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
+#define IS31FL3731_SDB_PIN B16
/* i2c (for LED matrix) */
#define I2C1_CLOCK_SPEED 400000
diff --git a/keyboards/input_club/ergodox_infinity/ergodox_infinity.c b/keyboards/input_club/ergodox_infinity/ergodox_infinity.c
index 80d36814373..7660a41f56c 100644
--- a/keyboards/input_club/ergodox_infinity/ergodox_infinity.c
+++ b/keyboards/input_club/ergodox_infinity/ergodox_infinity.c
@@ -95,11 +95,6 @@ __attribute__ ((weak)) void matrix_scan_user(void) {}
void keyboard_pre_init_kb(void) {
-#ifdef LED_MATRIX_ENABLE
- // Turn on LED controller
- setPinOutput(B16);
- writePinHigh(B16);
-#endif
// The backlight always has to be initialized, otherwise it will stay lit
lcd_backlight_hal_init();
#ifdef ST7565_ENABLE
diff --git a/keyboards/input_club/k_type/config.h b/keyboards/input_club/k_type/config.h
index 182f0a61d7e..e46ede7b7b7 100644
--- a/keyboards/input_club/k_type/config.h
+++ b/keyboards/input_club/k_type/config.h
@@ -50,3 +50,4 @@ along with this program. If not, see .
#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND
#define IS31FL3733_I2C_ADDRESS_2 IS31FL3733_I2C_ADDRESS_GND_GND
+#define IS31FL3733_SDB_PIN B16
diff --git a/keyboards/input_club/k_type/is31fl3733-dual.c b/keyboards/input_club/k_type/is31fl3733-dual.c
index f8f4398332a..9e1e6b57f76 100644
--- a/keyboards/input_club/k_type/is31fl3733-dual.c
+++ b/keyboards/input_club/k_type/is31fl3733-dual.c
@@ -18,6 +18,7 @@
#include "is31fl3733-dual.h"
#include "i2c_master.h"
+#include "gpio.h"
#include "wait.h"
#define IS31FL3733_PWM_REGISTER_COUNT 192
@@ -126,6 +127,11 @@ void is31fl3733_write_pwm_buffer(uint8_t bus, uint8_t index) {
}
void is31fl3733_init_drivers(void) {
+#if defined(IS31FL3733_SDB_PIN)
+ setPinOutput(IS31FL3733_SDB_PIN);
+ writePinHigh(IS31FL3733_SDB_PIN);
+#endif
+
i2c_init(&I2CD1, I2C1_SCL_PIN, I2C1_SDA_PIN);
is31fl3733_init(0, 0);
diff --git a/keyboards/input_club/k_type/k_type.c b/keyboards/input_club/k_type/k_type.c
index e97007fc704..c1377ebe61c 100644
--- a/keyboards/input_club/k_type/k_type.c
+++ b/keyboards/input_club/k_type/k_type.c
@@ -201,14 +201,6 @@ led_config_t g_led_config = {
}
};
-void keyboard_pre_init_kb(void) {
- // Turn on LED controller
- setPinOutput(B16);
- writePinHigh(B16);
-
- keyboard_pre_init_user();
-}
-
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
diff --git a/keyboards/input_club/whitefox/config.h b/keyboards/input_club/whitefox/config.h
index 0a2a060e9ba..664fcf9dc12 100644
--- a/keyboards/input_club/whitefox/config.h
+++ b/keyboards/input_club/whitefox/config.h
@@ -22,6 +22,7 @@ along with this program. If not, see .
/* LED matrix driver */
#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
+#define IS31FL3731_SDB_PIN B16
/* i2c (for LED matrix) */
#define I2C1_CLOCK_SPEED 400000
diff --git a/keyboards/input_club/whitefox/whitefox.c b/keyboards/input_club/whitefox/whitefox.c
index 07741365c39..773dbd3dc9d 100644
--- a/keyboards/input_club/whitefox/whitefox.c
+++ b/keyboards/input_club/whitefox/whitefox.c
@@ -65,15 +65,6 @@ led_config_t g_led_config = {
};
#endif
-void keyboard_pre_init_kb(void) {
-#ifdef LED_MATRIX_ENABLE
- // Turn on LED controller
- setPinOutput(B16);
- writePinHigh(B16);
-#endif
- keyboard_pre_init_user();
-}
-
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
diff --git a/keyboards/melgeek/mach80/config.h b/keyboards/melgeek/mach80/config.h
index 9c0ab6c13f8..68088ba7453 100755
--- a/keyboards/melgeek/mach80/config.h
+++ b/keyboards/melgeek/mach80/config.h
@@ -17,3 +17,4 @@
#pragma once
#define IS31FL3741_I2C_ADDRESS_1 IS31FL3741_I2C_ADDRESS_GND
+#define IS31FL3741_SDB_PIN B7
diff --git a/keyboards/melgeek/mach80/rev1/rev1.c b/keyboards/melgeek/mach80/rev1/rev1.c
index c09833bbaf7..630b399e210 100755
--- a/keyboards/melgeek/mach80/rev1/rev1.c
+++ b/keyboards/melgeek/mach80/rev1/rev1.c
@@ -183,11 +183,4 @@ void matrix_init_kb(void) {
matrix_init_user();
}
-
-
-void keyboard_pre_init_kb(void) {
- setPinOutput(B7);
- writePinHigh(B7);
- keyboard_pre_init_user();
-}
#endif
diff --git a/keyboards/melgeek/mach80/rev2/rev2.c b/keyboards/melgeek/mach80/rev2/rev2.c
index 1729d608c09..5cea55620b1 100755
--- a/keyboards/melgeek/mach80/rev2/rev2.c
+++ b/keyboards/melgeek/mach80/rev2/rev2.c
@@ -181,11 +181,4 @@ void matrix_init_kb(void) {
matrix_init_user();
}
-
-
-void keyboard_pre_init_kb(void) {
- setPinOutput(B7);
- writePinHigh(B7);
- keyboard_pre_init_user();
-}
#endif
diff --git a/keyboards/melgeek/mj61/config.h b/keyboards/melgeek/mj61/config.h
index 9c0ab6c13f8..010e035e2e3 100644
--- a/keyboards/melgeek/mj61/config.h
+++ b/keyboards/melgeek/mj61/config.h
@@ -17,3 +17,4 @@
#pragma once
#define IS31FL3741_I2C_ADDRESS_1 IS31FL3741_I2C_ADDRESS_GND
+#define IS31FL3741_SDB_PIN A2
diff --git a/keyboards/melgeek/mj61/rev1/rev1.c b/keyboards/melgeek/mj61/rev1/rev1.c
index 473ef5dc868..227d8c32aa2 100644
--- a/keyboards/melgeek/mj61/rev1/rev1.c
+++ b/keyboards/melgeek/mj61/rev1/rev1.c
@@ -116,9 +116,3 @@ void suspend_wakeup_init_kb(void) {
suspend_wakeup_init_user();
}
#endif
-
-void keyboard_pre_init_kb(void) {
- setPinOutput(A2);
- writePinHigh(A2);
- keyboard_pre_init_user();
-}
diff --git a/keyboards/melgeek/mj61/rev2/rev2.c b/keyboards/melgeek/mj61/rev2/rev2.c
index a699cf45c04..5c797a58225 100644
--- a/keyboards/melgeek/mj61/rev2/rev2.c
+++ b/keyboards/melgeek/mj61/rev2/rev2.c
@@ -126,9 +126,3 @@ void suspend_wakeup_init_kb(void) {
suspend_wakeup_init_user();
}
#endif
-
-void keyboard_pre_init_kb(void) {
- setPinOutput(A2);
- writePinHigh(A2);
- keyboard_pre_init_user();
-}
diff --git a/keyboards/melgeek/mj63/config.h b/keyboards/melgeek/mj63/config.h
index 9c0ab6c13f8..010e035e2e3 100644
--- a/keyboards/melgeek/mj63/config.h
+++ b/keyboards/melgeek/mj63/config.h
@@ -17,3 +17,4 @@
#pragma once
#define IS31FL3741_I2C_ADDRESS_1 IS31FL3741_I2C_ADDRESS_GND
+#define IS31FL3741_SDB_PIN A2
diff --git a/keyboards/melgeek/mj63/rev1/rev1.c b/keyboards/melgeek/mj63/rev1/rev1.c
index b286ec7ca61..78e12b3f73c 100644
--- a/keyboards/melgeek/mj63/rev1/rev1.c
+++ b/keyboards/melgeek/mj63/rev1/rev1.c
@@ -119,12 +119,4 @@ void suspend_wakeup_init_kb(void) {
rgb_matrix_set_suspend_state(false);
suspend_wakeup_init_user();
}
-
-void keyboard_pre_init_kb(void) {
- setPinOutput(A2);
- writePinHigh(A2);
- keyboard_pre_init_user();
-}
-
#endif
-
diff --git a/keyboards/melgeek/mj63/rev2/rev2.c b/keyboards/melgeek/mj63/rev2/rev2.c
index 5a04475bae0..d452661c45c 100644
--- a/keyboards/melgeek/mj63/rev2/rev2.c
+++ b/keyboards/melgeek/mj63/rev2/rev2.c
@@ -126,9 +126,3 @@ void suspend_wakeup_init_kb(void) {
suspend_wakeup_init_user();
}
#endif
-
-void keyboard_pre_init_kb(void) {
- setPinOutput(A2);
- writePinHigh(A2);
- keyboard_pre_init_user();
-}
diff --git a/keyboards/melgeek/mj64/config.h b/keyboards/melgeek/mj64/config.h
index 9c0ab6c13f8..010e035e2e3 100644
--- a/keyboards/melgeek/mj64/config.h
+++ b/keyboards/melgeek/mj64/config.h
@@ -17,3 +17,4 @@
#pragma once
#define IS31FL3741_I2C_ADDRESS_1 IS31FL3741_I2C_ADDRESS_GND
+#define IS31FL3741_SDB_PIN A2
diff --git a/keyboards/melgeek/mj64/rev1/rev1.c b/keyboards/melgeek/mj64/rev1/rev1.c
index a608f83afe1..efc9637db81 100644
--- a/keyboards/melgeek/mj64/rev1/rev1.c
+++ b/keyboards/melgeek/mj64/rev1/rev1.c
@@ -116,11 +116,4 @@ void suspend_wakeup_init_kb(void) {
rgb_matrix_set_suspend_state(false);
suspend_wakeup_init_user();
}
-
-void keyboard_pre_init_kb(void) {
- setPinOutput(A2);
- writePinHigh(A2);
- keyboard_pre_init_user();
-}
-
#endif
diff --git a/keyboards/melgeek/mj64/rev2/rev2.c b/keyboards/melgeek/mj64/rev2/rev2.c
index 67c17855fd7..2f11cc95baf 100644
--- a/keyboards/melgeek/mj64/rev2/rev2.c
+++ b/keyboards/melgeek/mj64/rev2/rev2.c
@@ -119,12 +119,4 @@ void suspend_wakeup_init_kb(void) {
rgb_matrix_set_suspend_state(false);
suspend_wakeup_init_user();
}
-
-void keyboard_pre_init_kb(void) {
- setPinOutput(A2);
- writePinHigh(A2);
- keyboard_pre_init_user();
-}
-
#endif
-
diff --git a/keyboards/melgeek/mj64/rev3/rev3.c b/keyboards/melgeek/mj64/rev3/rev3.c
index 77f86bb015c..d797301b0a7 100644
--- a/keyboards/melgeek/mj64/rev3/rev3.c
+++ b/keyboards/melgeek/mj64/rev3/rev3.c
@@ -126,9 +126,3 @@ void suspend_wakeup_init_kb(void) {
suspend_wakeup_init_user();
}
#endif
-
-void keyboard_pre_init_kb(void) {
- setPinOutput(A2);
- writePinHigh(A2);
- keyboard_pre_init_user();
-}
diff --git a/keyboards/melgeek/mj65/config.h b/keyboards/melgeek/mj65/config.h
index 9c0ab6c13f8..010e035e2e3 100644
--- a/keyboards/melgeek/mj65/config.h
+++ b/keyboards/melgeek/mj65/config.h
@@ -17,3 +17,4 @@
#pragma once
#define IS31FL3741_I2C_ADDRESS_1 IS31FL3741_I2C_ADDRESS_GND
+#define IS31FL3741_SDB_PIN A2
diff --git a/keyboards/melgeek/mj65/rev3/rev3.c b/keyboards/melgeek/mj65/rev3/rev3.c
index 1ebf87e0996..39eb0431641 100644
--- a/keyboards/melgeek/mj65/rev3/rev3.c
+++ b/keyboards/melgeek/mj65/rev3/rev3.c
@@ -131,9 +131,3 @@ void suspend_wakeup_init_kb(void) {
}
#endif
-
-void keyboard_pre_init_kb(void) {
- setPinOutput(A2);
- writePinHigh(A2);
- keyboard_pre_init_user();
-}
diff --git a/keyboards/melgeek/mojo68/config.h b/keyboards/melgeek/mojo68/config.h
index 9c0ab6c13f8..68088ba7453 100755
--- a/keyboards/melgeek/mojo68/config.h
+++ b/keyboards/melgeek/mojo68/config.h
@@ -17,3 +17,4 @@
#pragma once
#define IS31FL3741_I2C_ADDRESS_1 IS31FL3741_I2C_ADDRESS_GND
+#define IS31FL3741_SDB_PIN B7
diff --git a/keyboards/melgeek/mojo68/rev1/rev1.c b/keyboards/melgeek/mojo68/rev1/rev1.c
index 901a099fd59..0490acd7dcd 100755
--- a/keyboards/melgeek/mojo68/rev1/rev1.c
+++ b/keyboards/melgeek/mojo68/rev1/rev1.c
@@ -151,11 +151,4 @@ void matrix_init_kb(void) {
matrix_init_user();
}
-
-
-void keyboard_pre_init_kb(void) {
- setPinOutput(B7);
- writePinHigh(B7);
- keyboard_pre_init_user();
-}
#endif
diff --git a/keyboards/melgeek/mojo75/config.h b/keyboards/melgeek/mojo75/config.h
index 9c0ab6c13f8..010e035e2e3 100644
--- a/keyboards/melgeek/mojo75/config.h
+++ b/keyboards/melgeek/mojo75/config.h
@@ -17,3 +17,4 @@
#pragma once
#define IS31FL3741_I2C_ADDRESS_1 IS31FL3741_I2C_ADDRESS_GND
+#define IS31FL3741_SDB_PIN A2
diff --git a/keyboards/melgeek/mojo75/rev1/rev1.c b/keyboards/melgeek/mojo75/rev1/rev1.c
index f0431083804..7a8e3cb2d3f 100644
--- a/keyboards/melgeek/mojo75/rev1/rev1.c
+++ b/keyboards/melgeek/mojo75/rev1/rev1.c
@@ -149,12 +149,4 @@ void suspend_wakeup_init_kb(void) {
rgb_matrix_set_suspend_state(false);
suspend_wakeup_init_user();
}
-
-void keyboard_pre_init_kb(void) {
- setPinOutput(A2);
- writePinHigh(A2);
- keyboard_pre_init_user();
-}
-
#endif
-
diff --git a/keyboards/melgeek/tegic/config.h b/keyboards/melgeek/tegic/config.h
index 9c0ab6c13f8..68088ba7453 100755
--- a/keyboards/melgeek/tegic/config.h
+++ b/keyboards/melgeek/tegic/config.h
@@ -17,3 +17,4 @@
#pragma once
#define IS31FL3741_I2C_ADDRESS_1 IS31FL3741_I2C_ADDRESS_GND
+#define IS31FL3741_SDB_PIN B7
diff --git a/keyboards/melgeek/tegic/rev1/rev1.c b/keyboards/melgeek/tegic/rev1/rev1.c
index 2b36ec76098..eacbebf94c1 100755
--- a/keyboards/melgeek/tegic/rev1/rev1.c
+++ b/keyboards/melgeek/tegic/rev1/rev1.c
@@ -142,14 +142,4 @@ led_config_t g_led_config = {
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
}
};
-
-
-
-
#endif
-
-void keyboard_pre_init_kb(void) {
- setPinOutput(B7);
- writePinHigh(B7);
- keyboard_pre_init_user();
-}
diff --git a/keyboards/opendeck/32/rev1/config.h b/keyboards/opendeck/32/rev1/config.h
index 17cf330d6d5..446cb047faa 100644
--- a/keyboards/opendeck/32/rev1/config.h
+++ b/keyboards/opendeck/32/rev1/config.h
@@ -16,6 +16,8 @@
#pragma once
#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
+#define IS31FL3731_SDB_PIN D2
+#define IS31FL3731_IRQ_PIN D3
#define RGB_MATRIX_DISABLE_KEYCODES
diff --git a/keyboards/opendeck/32/rev1/rev1.c b/keyboards/opendeck/32/rev1/rev1.c
index 2bf04f8479f..8b3f9c02222 100644
--- a/keyboards/opendeck/32/rev1/rev1.c
+++ b/keyboards/opendeck/32/rev1/rev1.c
@@ -93,13 +93,9 @@ void keyboard_pre_init_kb(void) {
setPinOutput(POWER_LED_PIN);
writePinLow(POWER_LED_PIN);
- // Enable RGB driver IC
- setPinOutput(RGB_DISABLE_N_PIN);
- writePinHigh(RGB_DISABLE_N_PIN);
-
// We don't use this feature of the IS31FL3731 but it is electrically connected
// Make sure not to drive it
- setPinInput(RGB_IRQ_N_PIN);
+ setPinInput(IS31FL3731_IRQ_PIN);
keyboard_pre_init_user();
}
diff --git a/keyboards/opendeck/32/rev1/rev1.h b/keyboards/opendeck/32/rev1/rev1.h
index 69777d95abe..455b2ac7531 100644
--- a/keyboards/opendeck/32/rev1/rev1.h
+++ b/keyboards/opendeck/32/rev1/rev1.h
@@ -19,8 +19,6 @@
#include "quantum.h"
#define POWER_LED_PIN F1
-#define RGB_DISABLE_N_PIN D2
-#define RGB_IRQ_N_PIN D3
// If you want something similar to what Taran from LMG does in https://github.com/TaranVH/2nd-keyboard
// you can create a "wrapper key" by uncommenting the row below and chosing your wrapper keycode.
diff --git a/keyboards/skyloong/gk61/pro/config.h b/keyboards/skyloong/gk61/pro/config.h
index 5e6d6d0e6a2..db02496f8b4 100644
--- a/keyboards/skyloong/gk61/pro/config.h
+++ b/keyboards/skyloong/gk61/pro/config.h
@@ -4,9 +4,9 @@
#pragma once
#define IS31FL3743A_I2C_ADDRESS_1 IS31FL3743A_I2C_ADDRESS_GND_GND
+#define IS31FL3743A_SDB_PIN C1
#define CAPS_LOCK_INDEX 28
#define WIN_MOD_INDEX 16
#define MAC_MOD_INDEX 17
#define WIN_LOCK_INDEX 54
-#define SDB C1 //RGB matrix Power control PIN
diff --git a/keyboards/skyloong/gk61/pro/pro.c b/keyboards/skyloong/gk61/pro/pro.c
index 6240d9cead5..55fcf3b41f5 100644
--- a/keyboards/skyloong/gk61/pro/pro.c
+++ b/keyboards/skyloong/gk61/pro/pro.c
@@ -213,14 +213,14 @@ bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {
void suspend_power_down_kb() {
# ifdef RGB_MATRIX_ENABLE
- writePinLow(SDB);
+ writePinLow(IS31FL3743A_SDB_PIN);
# endif
suspend_power_down_user();
}
void suspend_wakeup_init_kb() {
# ifdef RGB_MATRIX_ENABLE
- writePinHigh(SDB);
+ writePinHigh(IS31FL3743A_SDB_PIN);
# endif
suspend_wakeup_init_user();
}
@@ -228,8 +228,4 @@ void suspend_wakeup_init_kb() {
void board_init(void) {
// JTAG-DP Disabled and SW-DP Disabled
AFIO->MAPR = (AFIO->MAPR & ~AFIO_MAPR_SWJ_CFG_Msk) | AFIO_MAPR_SWJ_CFG_DISABLE;
-# ifdef RGB_MATRIX_ENABLE
- setPinOutput(SDB);
- writePinHigh(SDB);
-# endif
}
diff --git a/keyboards/skyloong/gk61/pro_48/config.h b/keyboards/skyloong/gk61/pro_48/config.h
index 18f3ef3e728..5b4976e2dad 100644
--- a/keyboards/skyloong/gk61/pro_48/config.h
+++ b/keyboards/skyloong/gk61/pro_48/config.h
@@ -4,10 +4,10 @@
#pragma once
#define IS31FL3743A_I2C_ADDRESS_1 IS31FL3743A_I2C_ADDRESS_GND_GND
+#define IS31FL3743A_SDB_PIN A4
#define CAPS_LOCK_INDEX 28
#define WIN_MOD_INDEX 16
#define MAC_MOD_INDEX 17
-#define SDB A4
#define g_suspend_state rgb_matrix_get_suspend_state()
diff --git a/keyboards/skyloong/gk61/pro_48/pro_48.c b/keyboards/skyloong/gk61/pro_48/pro_48.c
index dc1058a08ba..ffa04f2c056 100644
--- a/keyboards/skyloong/gk61/pro_48/pro_48.c
+++ b/keyboards/skyloong/gk61/pro_48/pro_48.c
@@ -149,12 +149,12 @@ bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {
void suspend_power_down_kb(void) {
- writePinLow(SDB);
+ writePinLow(IS31FL3743A_SDB_PIN);
suspend_power_down_user();
}
void suspend_wakeup_init_kb(void) {
- writePinHigh(SDB);
+ writePinHigh(IS31FL3743A_SDB_PIN);
suspend_wakeup_init_user();
}
#endif
@@ -220,8 +220,4 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
void board_init(void) {
// JTAG-DP Disabled and SW-DP Disabled
AFIO->MAPR = (AFIO->MAPR & ~AFIO_MAPR_SWJ_CFG_Msk) | AFIO_MAPR_SWJ_CFG_DISABLE;
-# ifdef RGB_MATRIX_ENABLE
- setPinOutput(SDB);
- writePinHigh(SDB);
-# endif
}
diff --git a/keyboards/skyloong/gk61/v1/config.h b/keyboards/skyloong/gk61/v1/config.h
index 146a19e6fd2..d1dae51219f 100644
--- a/keyboards/skyloong/gk61/v1/config.h
+++ b/keyboards/skyloong/gk61/v1/config.h
@@ -16,5 +16,4 @@
#pragma once
#define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_GND
-
-#define SDB C1
+#define SNLED27351_SDB_PIN C1
diff --git a/keyboards/skyloong/gk61/v1/v1.c b/keyboards/skyloong/gk61/v1/v1.c
index 1ee3522b50b..cb362b53596 100644
--- a/keyboards/skyloong/gk61/v1/v1.c
+++ b/keyboards/skyloong/gk61/v1/v1.c
@@ -102,18 +102,13 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = {
#endif // RGB_MATRIX_ENABLE
void suspend_power_down_kb() {
- writePinLow(SDB);
+ writePinLow(SNLED27351_SDB_PIN);
suspend_power_down_user();
}
void suspend_wakeup_init_kb() {
- writePinHigh(SDB);
-
+ writePinHigh(SNLED27351_SDB_PIN);
+
suspend_wakeup_init_user();
}
-
-void board_init(void) {
- setPinOutput(SDB);
- writePinHigh(SDB);
-}
diff --git a/keyboards/teleport/native/config.h b/keyboards/teleport/native/config.h
index acb481bc96a..31d0025883c 100644
--- a/keyboards/teleport/native/config.h
+++ b/keyboards/teleport/native/config.h
@@ -26,6 +26,7 @@ along with this program. If not, see .
#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND
#define IS31FL3733_I2C_ADDRESS_2 IS31FL3733_I2C_ADDRESS_GND_VCC
+#define IS31FL3733_SDB_PIN B9
#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CUSTOM_SINGLE_COLOR_RAINDROPS
diff --git a/keyboards/teleport/native/native.c b/keyboards/teleport/native/native.c
index b11b63f1f63..5d8ccc64752 100644
--- a/keyboards/teleport/native/native.c
+++ b/keyboards/teleport/native/native.c
@@ -16,14 +16,6 @@
#include "quantum.h"
-/* This board has !SDB of the is31 wired to D2. Set high to enable */
-void keyboard_post_init_kb(void) {
- setPinOutput(B9);
- writePinHigh(B9);
-
- keyboard_post_init_user();
-}
-
#ifdef RGB_MATRIX_ENABLE
const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = {
/* Refer to IS31 manual for these locations