LED drivers: add support for shutdown pin (#23058)

* LED drivers: add support for shutdown pin

* Update candidate boards
This commit is contained in:
Ryan 2024-02-15 18:11:50 +11:00 committed by GitHub
parent 0b7df03ab7
commit a9f1105f98
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
63 changed files with 164 additions and 159 deletions

View file

@ -44,6 +44,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* 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

View file

@ -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

View file

@ -50,3 +50,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#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

View file

@ -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);

View file

@ -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

View file

@ -22,6 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* 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

View file

@ -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