diff options
author | Joel Challis <[email protected]> | 2023-11-10 05:14:22 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2023-11-10 05:14:22 +0000 |
commit | 84df69572ce47f74213869120211f9db371cd3cf (patch) | |
tree | 50a562f9d7136ac3c55c1b9e7c38e0c96741a8ee /drivers/led/issi/is31fl3736.h | |
parent | 8136cf4bfb2664a0a492f7346132afc78110cce0 (diff) | |
download | qmk_firmware-84df69572ce47f74213869120211f9db371cd3cf.tar.gz qmk_firmware-84df69572ce47f74213869120211f9db371cd3cf.zip |
Infer LED DRIVER_COUNT from configured addresses (#22311)
Diffstat (limited to 'drivers/led/issi/is31fl3736.h')
-rw-r--r-- | drivers/led/issi/is31fl3736.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/led/issi/is31fl3736.h b/drivers/led/issi/is31fl3736.h index bdb787494d..c3fa158de7 100644 --- a/drivers/led/issi/is31fl3736.h +++ b/drivers/led/issi/is31fl3736.h @@ -35,9 +35,6 @@ #ifdef DRIVER_ADDR_4 # define IS31FL3736_I2C_ADDRESS_4 DRIVER_ADDR_4 #endif -#ifdef DRIVER_COUNT -# define IS31FL3736_DRIVER_COUNT DRIVER_COUNT -#endif #ifdef ISSI_TIMEOUT # define IS31FL3736_I2C_TIMEOUT ISSI_TIMEOUT #endif @@ -88,6 +85,16 @@ # define IS31FL3736_LED_COUNT RGB_MATRIX_LED_COUNT #endif +#if defined(IS31FL3736_I2C_ADDRESS_4) +# define IS31FL3736_DRIVER_COUNT 4 +#elif defined(IS31FL3736_I2C_ADDRESS_3) +# define IS31FL3736_DRIVER_COUNT 3 +#elif defined(IS31FL3736_I2C_ADDRESS_2) +# define IS31FL3736_DRIVER_COUNT 2 +#elif defined(IS31FL3736_I2C_ADDRESS_1) +# define IS31FL3736_DRIVER_COUNT 1 +#endif + typedef struct is31fl3736_led_t { uint8_t driver : 2; uint8_t r; |