summaryrefslogtreecommitdiff
path: root/drivers/led/issi/is31fl3731-simple.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/led/issi/is31fl3731-simple.h')
-rw-r--r--drivers/led/issi/is31fl3731-simple.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/led/issi/is31fl3731-simple.h b/drivers/led/issi/is31fl3731-simple.h
index 185e80683b..32b42feab0 100644
--- a/drivers/led/issi/is31fl3731-simple.h
+++ b/drivers/led/issi/is31fl3731-simple.h
@@ -36,9 +36,6 @@
#ifdef LED_DRIVER_ADDR_4
# define IS31FL3731_I2C_ADDRESS_4 LED_DRIVER_ADDR_4
#endif
-#ifdef LED_DRIVER_COUNT
-# define IS31FL3731_DRIVER_COUNT LED_DRIVER_COUNT
-#endif
#ifdef ISSI_TIMEOUT
# define IS31FL3731_I2C_TIMEOUT ISSI_TIMEOUT
#endif
@@ -62,6 +59,16 @@
# define IS31FL3731_LED_COUNT LED_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 v;