From 41f37d459441d395de69c164febf442f6dcf2518 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sun, 22 Oct 2023 00:11:57 +1100 Subject: [PATCH] Add `_LED_COUNT` defines to LED drivers --- 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 f8c0efcc6f90..43441ee8d72a 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 2260361ec6b1..34a4886957a1 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 a5ac44fd1d53..844e11f4903b 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 3233fdc0d75f..1a65073ab52a 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 fff91bfdbfc2..39a7ebf469e1 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 8041a7f0f36e..e8633f12ca32 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 e56d04f66fb0..dc9895932f27 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 d5525e460d98..4a7238409af3 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 91312384ae18..a68aec1fa6cd 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 0f4e0d014b3d..fc713d372a77 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 a2a81640f653..7d6593b570a0 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 46c058c6445f..dda0850b5f77 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 30fab248bc9c..76d3115e64a3 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 ff71b44b9166..feb5338f33f5 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 770becdba182..d9bae7ea49b2 100644 --- a/drivers/led/snled27351.h +++ b/drivers/led/snled27351.h @@ -59,6 +59,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;