From a9f1105f98ecca299d401f81cd5cc1699683e2ce Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 15 Feb 2024 18:11:50 +1100 Subject: LED drivers: add support for shutdown pin (#23058) * LED drivers: add support for shutdown pin * Update candidate boards --- drivers/led/issi/is31fl3218-mono.c | 6 ++++++ drivers/led/issi/is31fl3218.c | 6 ++++++ drivers/led/issi/is31fl3731-mono.c | 6 ++++++ drivers/led/issi/is31fl3731.c | 6 ++++++ drivers/led/issi/is31fl3733-mono.c | 6 ++++++ drivers/led/issi/is31fl3733.c | 6 ++++++ drivers/led/issi/is31fl3736-mono.c | 6 ++++++ drivers/led/issi/is31fl3736.c | 6 ++++++ drivers/led/issi/is31fl3737-mono.c | 6 ++++++ drivers/led/issi/is31fl3737.c | 6 ++++++ drivers/led/issi/is31fl3741-mono.c | 6 ++++++ drivers/led/issi/is31fl3741.c | 6 ++++++ drivers/led/issi/is31fl3742a-mono.c | 6 ++++++ drivers/led/issi/is31fl3742a.c | 6 ++++++ drivers/led/issi/is31fl3743a-mono.c | 6 ++++++ drivers/led/issi/is31fl3743a.c | 6 ++++++ drivers/led/issi/is31fl3745-mono.c | 6 ++++++ drivers/led/issi/is31fl3745.c | 6 ++++++ drivers/led/issi/is31fl3746a-mono.c | 6 ++++++ drivers/led/issi/is31fl3746a.c | 6 ++++++ drivers/led/snled27351-mono.c | 6 ++++++ drivers/led/snled27351.c | 6 ++++++ 22 files changed, 132 insertions(+) (limited to 'drivers/led') diff --git a/drivers/led/issi/is31fl3218-mono.c b/drivers/led/issi/is31fl3218-mono.c index 5d3c22d7d9..cb5a069160 100644 --- a/drivers/led/issi/is31fl3218-mono.c +++ b/drivers/led/issi/is31fl3218-mono.c @@ -16,6 +16,7 @@ #include "is31fl3218-mono.h" #include "i2c_master.h" +#include "gpio.h" #define IS31FL3218_PWM_REGISTER_COUNT 18 #define IS31FL3218_LED_CONTROL_REGISTER_COUNT 3 @@ -66,6 +67,11 @@ void is31fl3218_write_pwm_buffer(void) { void is31fl3218_init(void) { i2c_init(); +#if defined(IS31FL3218_SDB_PIN) + setPinOutput(IS31FL3218_SDB_PIN); + writePinHigh(IS31FL3218_SDB_PIN); +#endif + // In case we ever want to reinitialize (?) is31fl3218_write_register(IS31FL3218_REG_RESET, 0x00); diff --git a/drivers/led/issi/is31fl3218.c b/drivers/led/issi/is31fl3218.c index c591e22a51..c3a0946e83 100644 --- a/drivers/led/issi/is31fl3218.c +++ b/drivers/led/issi/is31fl3218.c @@ -16,6 +16,7 @@ #include "is31fl3218.h" #include "i2c_master.h" +#include "gpio.h" #define IS31FL3218_PWM_REGISTER_COUNT 18 #define IS31FL3218_LED_CONTROL_REGISTER_COUNT 3 @@ -66,6 +67,11 @@ void is31fl3218_write_pwm_buffer(void) { void is31fl3218_init(void) { i2c_init(); +#if defined(IS31FL3218_SDB_PIN) + setPinOutput(IS31FL3218_SDB_PIN); + writePinHigh(IS31FL3218_SDB_PIN); +#endif + // In case we ever want to reinitialize (?) is31fl3218_write_register(IS31FL3218_REG_RESET, 0x00); diff --git a/drivers/led/issi/is31fl3731-mono.c b/drivers/led/issi/is31fl3731-mono.c index d3be496ec3..5ff8f8b7c5 100644 --- a/drivers/led/issi/is31fl3731-mono.c +++ b/drivers/led/issi/is31fl3731-mono.c @@ -19,6 +19,7 @@ #include "is31fl3731-mono.h" #include "i2c_master.h" +#include "gpio.h" #include "wait.h" #define IS31FL3731_PWM_REGISTER_COUNT 144 @@ -97,6 +98,11 @@ void is31fl3731_write_pwm_buffer(uint8_t index) { void is31fl3731_init_drivers(void) { i2c_init(); +#if defined(IS31FL3731_SDB_PIN) + setPinOutput(IS31FL3731_SDB_PIN); + writePinHigh(IS31FL3731_SDB_PIN); +#endif + for (uint8_t i = 0; i < IS31FL3731_DRIVER_COUNT; i++) { is31fl3731_init(i); } diff --git a/drivers/led/issi/is31fl3731.c b/drivers/led/issi/is31fl3731.c index 09a4afec90..380861d5b8 100644 --- a/drivers/led/issi/is31fl3731.c +++ b/drivers/led/issi/is31fl3731.c @@ -18,6 +18,7 @@ #include "is31fl3731.h" #include "i2c_master.h" +#include "gpio.h" #include "wait.h" #define IS31FL3731_PWM_REGISTER_COUNT 144 @@ -96,6 +97,11 @@ void is31fl3731_write_pwm_buffer(uint8_t index) { void is31fl3731_init_drivers(void) { i2c_init(); +#if defined(IS31FL3731_SDB_PIN) + setPinOutput(IS31FL3731_SDB_PIN); + writePinHigh(IS31FL3731_SDB_PIN); +#endif + for (uint8_t i = 0; i < IS31FL3731_DRIVER_COUNT; i++) { is31fl3731_init(i); } diff --git a/drivers/led/issi/is31fl3733-mono.c b/drivers/led/issi/is31fl3733-mono.c index ecbfa4b7b1..13f2d9b983 100644 --- a/drivers/led/issi/is31fl3733-mono.c +++ b/drivers/led/issi/is31fl3733-mono.c @@ -20,6 +20,7 @@ #include "is31fl3733-mono.h" #include "i2c_master.h" +#include "gpio.h" #include "wait.h" #define IS31FL3733_PWM_REGISTER_COUNT 192 @@ -142,6 +143,11 @@ void is31fl3733_write_pwm_buffer(uint8_t index) { void is31fl3733_init_drivers(void) { i2c_init(); +#if defined(IS31FL3733_SDB_PIN) + setPinOutput(IS31FL3733_SDB_PIN); + writePinHigh(IS31FL3733_SDB_PIN); +#endif + for (uint8_t i = 0; i < IS31FL3733_DRIVER_COUNT; i++) { is31fl3733_init(i); } diff --git a/drivers/led/issi/is31fl3733.c b/drivers/led/issi/is31fl3733.c index 236eed72eb..ac6f4b4c89 100644 --- a/drivers/led/issi/is31fl3733.c +++ b/drivers/led/issi/is31fl3733.c @@ -19,6 +19,7 @@ #include "is31fl3733.h" #include "i2c_master.h" +#include "gpio.h" #include "wait.h" #define IS31FL3733_PWM_REGISTER_COUNT 192 @@ -141,6 +142,11 @@ void is31fl3733_write_pwm_buffer(uint8_t index) { void is31fl3733_init_drivers(void) { i2c_init(); +#if defined(IS31FL3733_SDB_PIN) + setPinOutput(IS31FL3733_SDB_PIN); + writePinHigh(IS31FL3733_SDB_PIN); +#endif + for (uint8_t i = 0; i < IS31FL3733_DRIVER_COUNT; i++) { is31fl3733_init(i); } diff --git a/drivers/led/issi/is31fl3736-mono.c b/drivers/led/issi/is31fl3736-mono.c index e1c3279772..0d3b5db4e4 100644 --- a/drivers/led/issi/is31fl3736-mono.c +++ b/drivers/led/issi/is31fl3736-mono.c @@ -17,6 +17,7 @@ #include "is31fl3736-mono.h" #include "i2c_master.h" +#include "gpio.h" #include "wait.h" #define IS31FL3736_PWM_REGISTER_COUNT 192 // actually 96 @@ -113,6 +114,11 @@ void is31fl3736_write_pwm_buffer(uint8_t index) { void is31fl3736_init_drivers(void) { i2c_init(); +#if defined(IS31FL3736_SDB_PIN) + setPinOutput(IS31FL3736_SDB_PIN); + writePinHigh(IS31FL3736_SDB_PIN); +#endif + for (uint8_t i = 0; i < IS31FL3736_DRIVER_COUNT; i++) { is31fl3736_init(i); } diff --git a/drivers/led/issi/is31fl3736.c b/drivers/led/issi/is31fl3736.c index 1d14be382d..990e6c8905 100644 --- a/drivers/led/issi/is31fl3736.c +++ b/drivers/led/issi/is31fl3736.c @@ -17,6 +17,7 @@ #include "is31fl3736.h" #include "i2c_master.h" +#include "gpio.h" #include "wait.h" #define IS31FL3736_PWM_REGISTER_COUNT 192 // actually 96 @@ -113,6 +114,11 @@ void is31fl3736_write_pwm_buffer(uint8_t index) { void is31fl3736_init_drivers(void) { i2c_init(); +#if defined(IS31FL3736_SDB_PIN) + setPinOutput(IS31FL3736_SDB_PIN); + writePinHigh(IS31FL3736_SDB_PIN); +#endif + for (uint8_t i = 0; i < IS31FL3736_DRIVER_COUNT; i++) { is31fl3736_init(i); } diff --git a/drivers/led/issi/is31fl3737-mono.c b/drivers/led/issi/is31fl3737-mono.c index 11e23acb23..37d684cff0 100644 --- a/drivers/led/issi/is31fl3737-mono.c +++ b/drivers/led/issi/is31fl3737-mono.c @@ -19,6 +19,7 @@ #include "is31fl3737-mono.h" #include "i2c_master.h" +#include "gpio.h" #include "wait.h" #define IS31FL3737_PWM_REGISTER_COUNT 192 // actually 144 @@ -115,6 +116,11 @@ void is31fl3737_write_pwm_buffer(uint8_t index) { void is31fl3737_init_drivers(void) { i2c_init(); +#if defined(IS31FL3737_SDB_PIN) + setPinOutput(IS31FL3737_SDB_PIN); + writePinHigh(IS31FL3737_SDB_PIN); +#endif + for (uint8_t i = 0; i < IS31FL3737_DRIVER_COUNT; i++) { is31fl3737_init(i); } diff --git a/drivers/led/issi/is31fl3737.c b/drivers/led/issi/is31fl3737.c index 2a98d7c3d0..fb760cda5e 100644 --- a/drivers/led/issi/is31fl3737.c +++ b/drivers/led/issi/is31fl3737.c @@ -19,6 +19,7 @@ #include "is31fl3737.h" #include "i2c_master.h" +#include "gpio.h" #include "wait.h" #define IS31FL3737_PWM_REGISTER_COUNT 192 // actually 144 @@ -115,6 +116,11 @@ void is31fl3737_write_pwm_buffer(uint8_t index) { void is31fl3737_init_drivers(void) { i2c_init(); +#if defined(IS31FL3737_SDB_PIN) + setPinOutput(IS31FL3737_SDB_PIN); + writePinHigh(IS31FL3737_SDB_PIN); +#endif + for (uint8_t i = 0; i < IS31FL3737_DRIVER_COUNT; i++) { is31fl3737_init(i); } diff --git a/drivers/led/issi/is31fl3741-mono.c b/drivers/led/issi/is31fl3741-mono.c index 806664d415..e4857b72d4 100644 --- a/drivers/led/issi/is31fl3741-mono.c +++ b/drivers/led/issi/is31fl3741-mono.c @@ -19,6 +19,7 @@ #include "is31fl3741-mono.h" #include "i2c_master.h" +#include "gpio.h" #include "wait.h" #define IS31FL3741_PWM_0_REGISTER_COUNT 180 @@ -141,6 +142,11 @@ void is31fl3741_write_pwm_buffer(uint8_t index) { void is31fl3741_init_drivers(void) { i2c_init(); +#if defined(IS31FL3741_SDB_PIN) + setPinOutput(IS31FL3741_SDB_PIN); + writePinHigh(IS31FL3741_SDB_PIN); +#endif + for (uint8_t i = 0; i < IS31FL3741_DRIVER_COUNT; i++) { is31fl3741_init(i); } diff --git a/drivers/led/issi/is31fl3741.c b/drivers/led/issi/is31fl3741.c index 7de649ec91..a6cb661d91 100644 --- a/drivers/led/issi/is31fl3741.c +++ b/drivers/led/issi/is31fl3741.c @@ -19,6 +19,7 @@ #include "is31fl3741.h" #include "i2c_master.h" +#include "gpio.h" #include "wait.h" #define IS31FL3741_PWM_0_REGISTER_COUNT 180 @@ -141,6 +142,11 @@ void is31fl3741_write_pwm_buffer(uint8_t index) { void is31fl3741_init_drivers(void) { i2c_init(); +#if defined(IS31FL3741_SDB_PIN) + setPinOutput(IS31FL3741_SDB_PIN); + writePinHigh(IS31FL3741_SDB_PIN); +#endif + for (uint8_t i = 0; i < IS31FL3741_DRIVER_COUNT; i++) { is31fl3741_init(i); } diff --git a/drivers/led/issi/is31fl3742a-mono.c b/drivers/led/issi/is31fl3742a-mono.c index 1eebbb72cb..a33865260c 100644 --- a/drivers/led/issi/is31fl3742a-mono.c +++ b/drivers/led/issi/is31fl3742a-mono.c @@ -20,6 +20,7 @@ #include "is31fl3742a-mono.h" #include "i2c_master.h" +#include "gpio.h" #include "wait.h" #define IS31FL3742A_PWM_REGISTER_COUNT 180 @@ -114,6 +115,11 @@ void is31fl3742a_write_pwm_buffer(uint8_t index) { void is31fl3742a_init_drivers(void) { i2c_init(); +#if defined(IS31FL3742A_SDB_PIN) + setPinOutput(IS31FL3742A_SDB_PIN); + writePinHigh(IS31FL3742A_SDB_PIN); +#endif + for (uint8_t i = 0; i < IS31FL3742A_DRIVER_COUNT; i++) { is31fl3742a_init(i); } diff --git a/drivers/led/issi/is31fl3742a.c b/drivers/led/issi/is31fl3742a.c index 4ff08cd75c..8900ae666f 100644 --- a/drivers/led/issi/is31fl3742a.c +++ b/drivers/led/issi/is31fl3742a.c @@ -20,6 +20,7 @@ #include "is31fl3742a.h" #include "i2c_master.h" +#include "gpio.h" #include "wait.h" #define IS31FL3742A_PWM_REGISTER_COUNT 180 @@ -114,6 +115,11 @@ void is31fl3742a_write_pwm_buffer(uint8_t index) { void is31fl3742a_init_drivers(void) { i2c_init(); +#if defined(IS31FL3742A_SDB_PIN) + setPinOutput(IS31FL3742A_SDB_PIN); + writePinHigh(IS31FL3742A_SDB_PIN); +#endif + for (uint8_t i = 0; i < IS31FL3742A_DRIVER_COUNT; i++) { is31fl3742a_init(i); } diff --git a/drivers/led/issi/is31fl3743a-mono.c b/drivers/led/issi/is31fl3743a-mono.c index 3753fb605c..99b1af160e 100644 --- a/drivers/led/issi/is31fl3743a-mono.c +++ b/drivers/led/issi/is31fl3743a-mono.c @@ -20,6 +20,7 @@ #include "is31fl3743a-mono.h" #include "i2c_master.h" +#include "gpio.h" #include "wait.h" #define IS31FL3743A_PWM_REGISTER_COUNT 198 @@ -136,6 +137,11 @@ void is31fl3743a_write_pwm_buffer(uint8_t index) { void is31fl3743a_init_drivers(void) { i2c_init(); +#if defined(IS31FL3743A_SDB_PIN) + setPinOutput(IS31FL3743A_SDB_PIN); + writePinHigh(IS31FL3743A_SDB_PIN); +#endif + for (uint8_t i = 0; i < IS31FL3743A_DRIVER_COUNT; i++) { is31fl3743a_init(i); } diff --git a/drivers/led/issi/is31fl3743a.c b/drivers/led/issi/is31fl3743a.c index eca3dca6b2..135e20710d 100644 --- a/drivers/led/issi/is31fl3743a.c +++ b/drivers/led/issi/is31fl3743a.c @@ -20,6 +20,7 @@ #include "is31fl3743a.h" #include "i2c_master.h" +#include "gpio.h" #include "wait.h" #define IS31FL3743A_PWM_REGISTER_COUNT 198 @@ -136,6 +137,11 @@ void is31fl3743a_write_pwm_buffer(uint8_t index) { void is31fl3743a_init_drivers(void) { i2c_init(); +#if defined(IS31FL3743A_SDB_PIN) + setPinOutput(IS31FL3743A_SDB_PIN); + writePinHigh(IS31FL3743A_SDB_PIN); +#endif + for (uint8_t i = 0; i < IS31FL3743A_DRIVER_COUNT; i++) { is31fl3743a_init(i); } diff --git a/drivers/led/issi/is31fl3745-mono.c b/drivers/led/issi/is31fl3745-mono.c index 8e7a1c522c..c5d083b272 100644 --- a/drivers/led/issi/is31fl3745-mono.c +++ b/drivers/led/issi/is31fl3745-mono.c @@ -20,6 +20,7 @@ #include "is31fl3745-mono.h" #include "i2c_master.h" +#include "gpio.h" #include "wait.h" #define IS31FL3745_PWM_REGISTER_COUNT 144 @@ -136,6 +137,11 @@ void is31fl3745_write_pwm_buffer(uint8_t index) { void is31fl3745_init_drivers(void) { i2c_init(); +#if defined(IS31FL3745_SDB_PIN) + setPinOutput(IS31FL3745_SDB_PIN); + writePinHigh(IS31FL3745_SDB_PIN); +#endif + for (uint8_t i = 0; i < IS31FL3745_DRIVER_COUNT; i++) { is31fl3745_init(i); } diff --git a/drivers/led/issi/is31fl3745.c b/drivers/led/issi/is31fl3745.c index 5f06e340e0..273fddf1d4 100644 --- a/drivers/led/issi/is31fl3745.c +++ b/drivers/led/issi/is31fl3745.c @@ -20,6 +20,7 @@ #include "is31fl3745.h" #include "i2c_master.h" +#include "gpio.h" #include "wait.h" #define IS31FL3745_PWM_REGISTER_COUNT 144 @@ -136,6 +137,11 @@ void is31fl3745_write_pwm_buffer(uint8_t index) { void is31fl3745_init_drivers(void) { i2c_init(); +#if defined(IS31FL3745_SDB_PIN) + setPinOutput(IS31FL3745_SDB_PIN); + writePinHigh(IS31FL3745_SDB_PIN); +#endif + for (uint8_t i = 0; i < IS31FL3745_DRIVER_COUNT; i++) { is31fl3745_init(i); } diff --git a/drivers/led/issi/is31fl3746a-mono.c b/drivers/led/issi/is31fl3746a-mono.c index 0c5b72ba2a..69d5079929 100644 --- a/drivers/led/issi/is31fl3746a-mono.c +++ b/drivers/led/issi/is31fl3746a-mono.c @@ -20,6 +20,7 @@ #include "is31fl3746a-mono.h" #include "i2c_master.h" +#include "gpio.h" #include "wait.h" #define IS31FL3746A_PWM_REGISTER_COUNT 72 @@ -114,6 +115,11 @@ void is31fl3746a_write_pwm_buffer(uint8_t index) { void is31fl3746a_init_drivers(void) { i2c_init(); +#if defined(IS31FL3746A_SDB_PIN) + setPinOutput(IS31FL3746A_SDB_PIN); + writePinHigh(IS31FL3746A_SDB_PIN); +#endif + for (uint8_t i = 0; i < IS31FL3746A_DRIVER_COUNT; i++) { is31fl3746a_init(i); } diff --git a/drivers/led/issi/is31fl3746a.c b/drivers/led/issi/is31fl3746a.c index 5cdb560594..c9dfbc5c40 100644 --- a/drivers/led/issi/is31fl3746a.c +++ b/drivers/led/issi/is31fl3746a.c @@ -20,6 +20,7 @@ #include "is31fl3746a.h" #include "i2c_master.h" +#include "gpio.h" #include "wait.h" #define IS31FL3746A_PWM_REGISTER_COUNT 72 @@ -114,6 +115,11 @@ void is31fl3746a_write_pwm_buffer(uint8_t index) { void is31fl3746a_init_drivers(void) { i2c_init(); +#if defined(IS31FL3746A_SDB_PIN) + setPinOutput(IS31FL3746A_SDB_PIN); + writePinHigh(IS31FL3746A_SDB_PIN); +#endif + for (uint8_t i = 0; i < IS31FL3746A_DRIVER_COUNT; i++) { is31fl3746a_init(i); } diff --git a/drivers/led/snled27351-mono.c b/drivers/led/snled27351-mono.c index 0c047fa771..e13fd8a343 100644 --- a/drivers/led/snled27351-mono.c +++ b/drivers/led/snled27351-mono.c @@ -16,6 +16,7 @@ #include "snled27351-mono.h" #include "i2c_master.h" +#include "gpio.h" #define SNLED27351_PWM_REGISTER_COUNT 192 #define SNLED27351_LED_CONTROL_REGISTER_COUNT 24 @@ -103,6 +104,11 @@ void snled27351_write_pwm_buffer(uint8_t index) { void snled27351_init_drivers(void) { i2c_init(); +#if defined(SNLED27351_SDB_PIN) + setPinOutput(SNLED27351_SDB_PIN); + writePinHigh(SNLED27351_SDB_PIN); +#endif + for (uint8_t i = 0; i < SNLED27351_DRIVER_COUNT; i++) { snled27351_init(i); } diff --git a/drivers/led/snled27351.c b/drivers/led/snled27351.c index 14fb95e165..293685b01b 100644 --- a/drivers/led/snled27351.c +++ b/drivers/led/snled27351.c @@ -16,6 +16,7 @@ #include "snled27351.h" #include "i2c_master.h" +#include "gpio.h" #define SNLED27351_PWM_REGISTER_COUNT 192 #define SNLED27351_LED_CONTROL_REGISTER_COUNT 24 @@ -103,6 +104,11 @@ void snled27351_write_pwm_buffer(uint8_t index) { void snled27351_init_drivers(void) { i2c_init(); +#if defined(SNLED27351_SDB_PIN) + setPinOutput(SNLED27351_SDB_PIN); + writePinHigh(SNLED27351_SDB_PIN); +#endif + for (uint8_t i = 0; i < SNLED27351_DRIVER_COUNT; i++) { snled27351_init(i); } -- cgit v1.2.3