1
0
Fork 0

Infer LED DRIVER_COUNT from configured addresses (#22311)

This commit is contained in:
Joel Challis 2023-11-10 05:14:22 +00:00 committed by GitHub
parent 8136cf4bfb
commit 84df69572c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 138 additions and 57 deletions

View file

@ -26,9 +26,6 @@
#include "util.h"
// ======== DEPRECATED DEFINES - DO NOT USE ========
#ifdef LED_DRIVER_COUNT
# define IS31FL3733_DRIVER_COUNT LED_DRIVER_COUNT
#endif
#ifdef ISSI_TIMEOUT
# define IS31FL3733_I2C_TIMEOUT ISSI_TIMEOUT
#endif
@ -81,6 +78,16 @@
# define IS31FL3733_LED_COUNT LED_MATRIX_LED_COUNT
#endif
#if defined(IS31FL3733_I2C_ADDRESS_4)
# define IS31FL3733_DRIVER_COUNT 4
#elif defined(IS31FL3733_I2C_ADDRESS_3)
# define IS31FL3733_DRIVER_COUNT 3
#elif defined(IS31FL3733_I2C_ADDRESS_2)
# define IS31FL3733_DRIVER_COUNT 2
#elif defined(IS31FL3733_I2C_ADDRESS_1)
# define IS31FL3733_DRIVER_COUNT 1
#endif
typedef struct is31fl3733_led_t {
uint8_t driver : 2;
uint8_t v;