summaryrefslogtreecommitdiff
path: root/drivers/led/snled27351-simple.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/led/snled27351-simple.h')
-rw-r--r--drivers/led/snled27351-simple.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/led/snled27351-simple.h b/drivers/led/snled27351-simple.h
index 051271cca8..66e5d162d0 100644
--- a/drivers/led/snled27351-simple.h
+++ b/drivers/led/snled27351-simple.h
@@ -22,9 +22,6 @@
#include "util.h"
// ======== DEPRECATED DEFINES - DO NOT USE ========
-#ifdef DRIVER_COUNT
-# define SNLED27351_DRIVER_COUNT DRIVER_COUNT
-#endif
#ifdef CKLED2001_TIMEOUT
# define SNLED27351_I2C_TIMEOUT CKLED2001_TIMEOUT
#endif
@@ -64,6 +61,16 @@
# define SNLED27351_LED_COUNT LED_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 v;