diff --git a/drivers/led/issi/is31fl3218-mono.c b/drivers/led/issi/is31fl3218-mono.c
index 5d3c22d7d9..cb5a069160 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 c591e22a51..c3a0946e83 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 d3be496ec3..5ff8f8b7c5 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 09a4afec90..380861d5b8 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 ecbfa4b7b1..13f2d9b983 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 236eed72eb..ac6f4b4c89 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 e1c3279772..0d3b5db4e4 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 1d14be382d..990e6c8905 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 11e23acb23..37d684cff0 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 2a98d7c3d0..fb760cda5e 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 806664d415..e4857b72d4 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 7de649ec91..a6cb661d91 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 1eebbb72cb..a33865260c 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 4ff08cd75c..8900ae666f 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 3753fb605c..99b1af160e 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 eca3dca6b2..135e20710d 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 8e7a1c522c..c5d083b272 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 5f06e340e0..273fddf1d4 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 0c5b72ba2a..69d5079929 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 5cdb560594..c9dfbc5c40 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 0c047fa771..e13fd8a343 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 14fb95e165..293685b01b 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 009c99e2ff..5baa57c34f 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 24676e8910..203e96d64e 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 b8ab5604d4..bf9ebc980f 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 80d3681437..7660a41f56 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 182f0a61d7..e46ede7b7b 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 f8f4398332..9e1e6b57f7 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 e97007fc70..c1377ebe61 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 0a2a060e9b..664fcf9dc1 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 07741365c3..773dbd3dc9 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 9c0ab6c13f..68088ba745 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 c09833bbaf..630b399e21 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 1729d608c0..5cea55620b 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 9c0ab6c13f..010e035e2e 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 473ef5dc86..227d8c32aa 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 a699cf45c0..5c797a5822 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 9c0ab6c13f..010e035e2e 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 b286ec7ca6..78e12b3f73 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 5a04475bae..d452661c45 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 9c0ab6c13f..010e035e2e 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 a608f83afe..efc9637db8 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 67c17855fd..2f11cc95ba 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 77f86bb015..d797301b0a 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 9c0ab6c13f..010e035e2e 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 1ebf87e099..39eb043164 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 9c0ab6c13f..68088ba745 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 901a099fd5..0490acd7dc 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 9c0ab6c13f..010e035e2e 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 f043108380..7a8e3cb2d3 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 9c0ab6c13f..68088ba745 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 2b36ec7609..eacbebf94c 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 17cf330d6d..446cb047fa 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 2bf04f8479..8b3f9c0222 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 69777d95ab..455b2ac753 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 5e6d6d0e6a..db02496f8b 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 6240d9cead..55fcf3b41f 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 18f3ef3e72..5b4976e2da 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 dc1058a08b..ffa04f2c05 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 146a19e6fd..d1dae51219 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 1ee3522b50..cb362b5359 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 acb481bc96..31d0025883 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 b11b63f1f6..5d8ccc6475 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