aboutsummaryrefslogtreecommitdiff
path: root/drivers/led/aw20216s.h
diff options
context:
space:
mode:
authorJoel Challis <[email protected]>2023-11-10 05:14:22 +0000
committerGitHub <[email protected]>2023-11-10 05:14:22 +0000
commit84df69572ce47f74213869120211f9db371cd3cf (patch)
tree50a562f9d7136ac3c55c1b9e7c38e0c96741a8ee /drivers/led/aw20216s.h
parent8136cf4bfb2664a0a492f7346132afc78110cce0 (diff)
downloadqmk_firmware-84df69572ce47f74213869120211f9db371cd3cf.tar.gz
qmk_firmware-84df69572ce47f74213869120211f9db371cd3cf.zip
Infer LED DRIVER_COUNT from configured addresses (#22311)
Diffstat (limited to 'drivers/led/aw20216s.h')
-rw-r--r--drivers/led/aw20216s.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/led/aw20216s.h b/drivers/led/aw20216s.h
index 7ad1e5653b..d79d632084 100644
--- a/drivers/led/aw20216s.h
+++ b/drivers/led/aw20216s.h
@@ -23,9 +23,6 @@
#include "util.h"
// ======== DEPRECATED DEFINES - DO NOT USE ========
-#ifdef DRIVER_COUNT
-# define AW20216S_DRIVER_COUNT DRIVER_COUNT
-#endif
#ifdef AW_SCALING_MAX
# define AW20216S_SCALING_MAX AW_SCALING_MAX
#endif
@@ -59,6 +56,12 @@
# define AW20216S_LED_COUNT RGB_MATRIX_LED_COUNT
#endif
+#if defined(AW20216S_CS_PIN_2)
+# define AW20216S_DRIVER_COUNT 2
+#elif defined(AW20216S_CS_PIN_1)
+# define AW20216S_DRIVER_COUNT 1
+#endif
+
typedef struct aw20216s_led_t {
uint8_t driver : 2;
uint8_t r;