forked from mirrors/qmk_userspace
Infer LED DRIVER_COUNT from configured addresses (#22311)
This commit is contained in:
parent
8136cf4bfb
commit
84df69572c
18 changed files with 138 additions and 57 deletions
|
@ -35,9 +35,6 @@
|
|||
#ifdef DRIVER_ADDR_4
|
||||
# define IS31FL3731_I2C_ADDRESS_4 DRIVER_ADDR_4
|
||||
#endif
|
||||
#ifdef DRIVER_COUNT
|
||||
# define IS31FL3731_DRIVER_COUNT DRIVER_COUNT
|
||||
#endif
|
||||
#ifdef ISSI_TIMEOUT
|
||||
# define IS31FL3731_I2C_TIMEOUT ISSI_TIMEOUT
|
||||
#endif
|
||||
|
@ -61,6 +58,16 @@
|
|||
# define IS31FL3731_LED_COUNT RGB_MATRIX_LED_COUNT
|
||||
#endif
|
||||
|
||||
#if defined(IS31FL3731_I2C_ADDRESS_4)
|
||||
# define IS31FL3731_DRIVER_COUNT 4
|
||||
#elif defined(IS31FL3731_I2C_ADDRESS_3)
|
||||
# define IS31FL3731_DRIVER_COUNT 3
|
||||
#elif defined(IS31FL3731_I2C_ADDRESS_2)
|
||||
# define IS31FL3731_DRIVER_COUNT 2
|
||||
#elif defined(IS31FL3731_I2C_ADDRESS_1)
|
||||
# define IS31FL3731_DRIVER_COUNT 1
|
||||
#endif
|
||||
|
||||
typedef struct is31fl3731_led_t {
|
||||
uint8_t driver : 2;
|
||||
uint8_t r;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue