From 17ccf3521bc9623e29f1f6febd167c3886f37408 Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 30 Oct 2023 08:39:26 +1000 Subject: [PATCH] Add `_LED_COUNT` defines to LED drivers (#22309) --- drivers/led/aw20216s.h | 4 ++++ drivers/led/issi/is31fl3218-simple.h | 4 ++++ drivers/led/issi/is31fl3218.h | 4 ++++ drivers/led/issi/is31fl3731-simple.h | 4 ++++ drivers/led/issi/is31fl3731.h | 4 ++++ drivers/led/issi/is31fl3733-simple.h | 4 ++++ drivers/led/issi/is31fl3733.h | 4 ++++ drivers/led/issi/is31fl3736-simple.h | 4 ++++ drivers/led/issi/is31fl3736.h | 4 ++++ drivers/led/issi/is31fl3737-simple.h | 4 ++++ drivers/led/issi/is31fl3737.h | 4 ++++ drivers/led/issi/is31fl3741-simple.h | 4 ++++ drivers/led/issi/is31fl3741.h | 4 ++++ drivers/led/snled27351-simple.h | 4 ++++ drivers/led/snled27351.h | 4 ++++ 15 files changed, 60 insertions(+) diff --git a/drivers/led/aw20216s.h b/drivers/led/aw20216s.h index 8abc2ee4af8..40601264466 100644 --- a/drivers/led/aw20216s.h +++ b/drivers/led/aw20216s.h @@ -54,6 +54,10 @@ #define g_aw_leds g_aw20216s_leds // ======== +#if defined(RGB_MATRIX_AW20216S) +# define AW20216S_LED_COUNT RGB_MATRIX_LED_COUNT +#endif + typedef struct aw20216s_led_t { uint8_t driver : 2; uint8_t r; diff --git a/drivers/led/issi/is31fl3218-simple.h b/drivers/led/issi/is31fl3218-simple.h index 2260361ec6b..34a4886957a 100644 --- a/drivers/led/issi/is31fl3218-simple.h +++ b/drivers/led/issi/is31fl3218-simple.h @@ -22,6 +22,10 @@ #define IS31FL3218_I2C_ADDRESS 0x54 +#if defined(LED_MATRIX_IS31FL3218) +# define IS31FL3218_LED_COUNT LED_MATRIX_LED_COUNT +#endif + typedef struct is31fl3218_led_t { uint8_t v; } __attribute__((packed)) is31fl3218_led_t; diff --git a/drivers/led/issi/is31fl3218.h b/drivers/led/issi/is31fl3218.h index a5ac44fd1d5..844e11f4903 100644 --- a/drivers/led/issi/is31fl3218.h +++ b/drivers/led/issi/is31fl3218.h @@ -22,6 +22,10 @@ #define IS31FL3218_I2C_ADDRESS 0x54 +#if defined(RGB_MATRIX_IS31FL3218) +# define IS31FL3218_LED_COUNT RGB_MATRIX_LED_COUNT +#endif + typedef struct is31fl3218_led_t { uint8_t r; uint8_t g; diff --git a/drivers/led/issi/is31fl3731-simple.h b/drivers/led/issi/is31fl3731-simple.h index 69d38e74dac..2ab253717c3 100644 --- a/drivers/led/issi/is31fl3731-simple.h +++ b/drivers/led/issi/is31fl3731-simple.h @@ -57,6 +57,10 @@ #define IS31FL3731_I2C_ADDRESS_SDA 0x76 #define IS31FL3731_I2C_ADDRESS_VCC 0x77 +#if defined(LED_MATRIX_IS31FL3731) +# define IS31FL3731_LED_COUNT LED_MATRIX_LED_COUNT +#endif + typedef struct is31fl3731_led_t { uint8_t driver : 2; uint8_t v; diff --git a/drivers/led/issi/is31fl3731.h b/drivers/led/issi/is31fl3731.h index cab6d40c5a7..756c5b473a8 100644 --- a/drivers/led/issi/is31fl3731.h +++ b/drivers/led/issi/is31fl3731.h @@ -56,6 +56,10 @@ #define IS31FL3731_I2C_ADDRESS_SDA 0x76 #define IS31FL3731_I2C_ADDRESS_VCC 0x77 +#if defined(RGB_MATRIX_IS31FL3731) +# define IS31FL3731_LED_COUNT RGB_MATRIX_LED_COUNT +#endif + typedef struct is31fl3731_led_t { uint8_t driver : 2; uint8_t r; diff --git a/drivers/led/issi/is31fl3733-simple.h b/drivers/led/issi/is31fl3733-simple.h index b8a4530260a..e9f68e35065 100644 --- a/drivers/led/issi/is31fl3733-simple.h +++ b/drivers/led/issi/is31fl3733-simple.h @@ -76,6 +76,10 @@ #define IS31FL3733_I2C_ADDRESS_VCC_SDA 0x5E #define IS31FL3733_I2C_ADDRESS_VCC_VCC 0x5F +#if defined(LED_MATRIX_IS31FL3733) +# define IS31FL3733_LED_COUNT LED_MATRIX_LED_COUNT +#endif + typedef struct is31fl3733_led_t { uint8_t driver : 2; uint8_t v; diff --git a/drivers/led/issi/is31fl3733.h b/drivers/led/issi/is31fl3733.h index 2a025769793..bda6f1908fd 100644 --- a/drivers/led/issi/is31fl3733.h +++ b/drivers/led/issi/is31fl3733.h @@ -99,6 +99,10 @@ #define IS31FL3733_I2C_ADDRESS_VCC_SDA 0x5E #define IS31FL3733_I2C_ADDRESS_VCC_VCC 0x5F +#if defined(RGB_MATRIX_IS31FL3733) +# define IS31FL3733_LED_COUNT RGB_MATRIX_LED_COUNT +#endif + typedef struct is31fl3733_led_t { uint8_t driver : 2; uint8_t r; diff --git a/drivers/led/issi/is31fl3736-simple.h b/drivers/led/issi/is31fl3736-simple.h index 4f9dee47b04..fe3cec9564c 100644 --- a/drivers/led/issi/is31fl3736-simple.h +++ b/drivers/led/issi/is31fl3736-simple.h @@ -71,6 +71,10 @@ #define IS31FL3736_I2C_ADDRESS_VCC_SDA 0x5E #define IS31FL3736_I2C_ADDRESS_VCC_VCC 0x5F +#if defined(LED_MATRIX_IS31FL3736) +# define IS31FL3736_LED_COUNT LED_MATRIX_LED_COUNT +#endif + typedef struct is31fl3736_led_t { uint8_t driver : 2; uint8_t v; diff --git a/drivers/led/issi/is31fl3736.h b/drivers/led/issi/is31fl3736.h index cd3505b0b6c..728021ae298 100644 --- a/drivers/led/issi/is31fl3736.h +++ b/drivers/led/issi/is31fl3736.h @@ -83,6 +83,10 @@ #define IS31FL3736_I2C_ADDRESS_VCC_SDA 0x5E #define IS31FL3736_I2C_ADDRESS_VCC_VCC 0x5F +#if defined(RGB_MATRIX_IS31FL3736) +# define IS31FL3736_LED_COUNT RGB_MATRIX_LED_COUNT +#endif + typedef struct is31fl3736_led_t { uint8_t driver : 2; uint8_t r; diff --git a/drivers/led/issi/is31fl3737-simple.h b/drivers/led/issi/is31fl3737-simple.h index 106127e737a..b177d4fb0a1 100644 --- a/drivers/led/issi/is31fl3737-simple.h +++ b/drivers/led/issi/is31fl3737-simple.h @@ -61,6 +61,10 @@ #define IS31FL3737_I2C_ADDRESS_SDA 0x5A #define IS31FL3737_I2C_ADDRESS_VCC 0x5F +#if defined(LED_MATRIX_IS31FL3737) +# define IS31FL3737_LED_COUNT LED_MATRIX_LED_COUNT +#endif + typedef struct is31fl3737_led_t { uint8_t driver : 2; uint8_t v; diff --git a/drivers/led/issi/is31fl3737.h b/drivers/led/issi/is31fl3737.h index bb4afbcccb0..12f84e3bfe4 100644 --- a/drivers/led/issi/is31fl3737.h +++ b/drivers/led/issi/is31fl3737.h @@ -76,6 +76,10 @@ #define IS31FL3737_I2C_ADDRESS_SDA 0x5A #define IS31FL3737_I2C_ADDRESS_VCC 0x5F +#if defined(RGB_MATRIX_IS31FL3737) +# define IS31FL3737_LED_COUNT RGB_MATRIX_LED_COUNT +#endif + typedef struct is31fl3737_led_t { uint8_t driver : 2; uint8_t r; diff --git a/drivers/led/issi/is31fl3741-simple.h b/drivers/led/issi/is31fl3741-simple.h index 29e6dc261d6..8ecc3302981 100644 --- a/drivers/led/issi/is31fl3741-simple.h +++ b/drivers/led/issi/is31fl3741-simple.h @@ -61,6 +61,10 @@ #define IS31FL3741_I2C_ADDRESS_SDA 0x32 #define IS31FL3741_I2C_ADDRESS_VCC 0x33 +#if defined(LED_MATRIX_IS31FL3741) +# define IS31FL3741_LED_COUNT LED_MATRIX_LED_COUNT +#endif + typedef struct is31fl3741_led_t { uint32_t driver : 2; uint32_t v : 10; diff --git a/drivers/led/issi/is31fl3741.h b/drivers/led/issi/is31fl3741.h index aedbe89b93d..13e132efa09 100644 --- a/drivers/led/issi/is31fl3741.h +++ b/drivers/led/issi/is31fl3741.h @@ -76,6 +76,10 @@ #define IS31FL3741_I2C_ADDRESS_SDA 0x32 #define IS31FL3741_I2C_ADDRESS_VCC 0x33 +#if defined(RGB_MATRIX_IS31FL3741) +# define IS31FL3741_LED_COUNT RGB_MATRIX_LED_COUNT +#endif + typedef struct is31fl3741_led_t { uint32_t driver : 2; uint32_t r : 10; diff --git a/drivers/led/snled27351-simple.h b/drivers/led/snled27351-simple.h index 999b70f8917..e8238071a54 100644 --- a/drivers/led/snled27351-simple.h +++ b/drivers/led/snled27351-simple.h @@ -59,6 +59,10 @@ #define SNLED27351_I2C_ADDRESS_SDA 0x76 #define SNLED27351_I2C_ADDRESS_VDDIO 0x77 +#if defined(LED_MATRIX_SNLED27351) +# define SNLED27351_LED_COUNT LED_MATRIX_LED_COUNT +#endif + typedef struct snled27351_led_t { uint8_t driver : 2; uint8_t v; diff --git a/drivers/led/snled27351.h b/drivers/led/snled27351.h index 59d56855f3c..e92ca717992 100644 --- a/drivers/led/snled27351.h +++ b/drivers/led/snled27351.h @@ -71,6 +71,10 @@ #define SNLED27351_I2C_ADDRESS_SDA 0x76 #define SNLED27351_I2C_ADDRESS_VDDIO 0x77 +#if defined(RGB_MATRIX_SNLED27351) +# define SNLED27351_LED_COUNT RGB_MATRIX_LED_COUNT +#endif + typedef struct snled27351_led_t { uint8_t driver : 2; uint8_t r;