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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
100 changed files with 795 additions and 798 deletions

View file

@ -23,8 +23,8 @@
#define IS31FL3731_DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 36
#define DRIVER_2_LED_TOTAL 36
#define ISSI_DRIVER_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
#define RGB_MATRIX_LED_COUNT ISSI_DRIVER_TOTAL
#define IS31FL3731_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
#define RGB_MATRIX_LED_COUNT IS31FL3731_LED_COUNT
#define RGB_MATRIX_DEFAULT_VAL 80
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS

View file

@ -18,7 +18,7 @@
#include "drivers/led/issi/is31fl3731.h"
#ifdef RGB_MATRIX_ENABLE
const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = {
const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
@ -149,7 +149,7 @@ static void init(void) {
is31fl3731_init(IS31FL3731_I2C_ADDRESS_1);
is31fl3731_init(IS31FL3731_I2C_ADDRESS_2);
for (int index = 0; index < ISSI_DRIVER_TOTAL; index++) {
for (int index = 0; index < IS31FL3731_LED_COUNT; index++) {
bool enabled = !( ( index == 18+5) || //B5
( index == 36+17) || //C17
( index == 54+13) //D13