Relocate LED driver init code (#22365)

This commit is contained in:
Ryan
2023-11-01 11:53:45 +11:00
committed by GitHub
parent eac8e67888
commit b52aca0af8
100 changed files with 795 additions and 798 deletions
+1 -1
View File
@@ -20,7 +20,7 @@
*/
#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
#define IS31FL3731_DRIVER_COUNT 1
#define LED_MATRIX_LED_COUNT 3
#define IS31FL3731_LED_COUNT 3
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap
*/
+2 -9
View File
@@ -22,14 +22,7 @@
* init IS31FL3731 and i2c
*/
void init_fallacy_leds(void) {
i2c_init();
is31fl3731_init(IS31FL3731_I2C_ADDRESS_1);
for (int i = 0; i < LED_MATRIX_LED_COUNT; i++) {
is31fl3731_set_led_control_register(i, true);
}
is31fl3731_update_led_control_registers(IS31FL3731_I2C_ADDRESS_1, 0);
is31fl3731_init_drivers();
}
@@ -54,7 +47,7 @@ void set_fallacy_led(int index, bool state) {
/* define LED matrix
*/
const is31fl3731_led_t PROGMEM g_is31fl3731_leds[LED_MATRIX_LED_COUNT] = {
const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
{0, C1_1},
{0, C2_1},
{0, C3_1},