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/snled27351.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/snled27351.h')
-rw-r--r-- | drivers/led/snled27351.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/led/snled27351.h b/drivers/led/snled27351.h index dd60f59183..77837d36aa 100644 --- a/drivers/led/snled27351.h +++ b/drivers/led/snled27351.h @@ -22,9 +22,6 @@ #include "util.h" // ======== DEPRECATED DEFINES - DO NOT USE ======== -#ifdef DRIVER_COUNT -# define SNLED27351_DRIVER_COUNT DRIVER_COUNT -#endif #ifdef DRIVER_ADDR_1 # define SNLED27351_I2C_ADDRESS_1 DRIVER_ADDR_1 #endif @@ -76,6 +73,16 @@ # define SNLED27351_LED_COUNT RGB_MATRIX_LED_COUNT #endif +#if defined(SNLED27351_I2C_ADDRESS_4) +# define SNLED27351_DRIVER_COUNT 4 +#elif defined(SNLED27351_I2C_ADDRESS_3) +# define SNLED27351_DRIVER_COUNT 3 +#elif defined(SNLED27351_I2C_ADDRESS_2) +# define SNLED27351_DRIVER_COUNT 2 +#elif defined(SNLED27351_I2C_ADDRESS_1) +# define SNLED27351_DRIVER_COUNT 1 +#endif + typedef struct snled27351_led_t { uint8_t driver : 2; uint8_t r; |