diff --git a/drivers/led/issi/is31fl3733-simple.c b/drivers/led/issi/is31fl3733-simple.c index 966a8d7cf29..63e9f533e2e 100644 --- a/drivers/led/issi/is31fl3733-simple.c +++ b/drivers/led/issi/is31fl3733-simple.c @@ -36,8 +36,8 @@ #define IS31FL3733_REG_CONFIGURATION 0x00 // PG3 #define IS31FL3733_REG_GLOBALCURRENT 0x01 // PG3 #define IS31FL3733_REG_RESET 0x11 // PG3 -#define IS31FL3733_REG_SWPULLUP 0x0F // PG3 -#define IS31FL3733_REG_CSPULLUP 0x10 // PG3 +#define IS31FL3733_REG_SW_PULLUP 0x0F // PG3 +#define IS31FL3733_REG_CS_PULLDOWN 0x10 // PG3 #define IS31FL3733_PWM_REGISTER_COUNT 192 #define IS31FL3733_LED_CONTROL_REGISTER_COUNT 24 @@ -54,12 +54,12 @@ # define IS31FL3733_PWM_FREQUENCY IS31FL3733_PWM_FREQUENCY_8K4_HZ // PFS - IS31FL3733B only #endif -#ifndef IS31FL3733_SWPULLUP -# define IS31FL3733_SWPULLUP IS31FL3733_PUR_0R +#ifndef IS31FL3733_SW_PULLUP +# define IS31FL3733_SW_PULLUP IS31FL3733_PUR_0_OHM #endif -#ifndef IS31FL3733_CSPULLUP -# define IS31FL3733_CSPULLUP IS31FL3733_PUR_0R +#ifndef IS31FL3733_CS_PULLDOWN +# define IS31FL3733_CSPULLDOWN IS31FL3733_PDR_0_OHM #endif #ifndef IS31FL3733_GLOBALCURRENT @@ -206,9 +206,9 @@ void is31fl3733_init(uint8_t addr, uint8_t sync) { // Select PG3 is31fl3733_write_register(addr, IS31FL3733_COMMANDREGISTER, IS31FL3733_PAGE_FUNCTION); // Set de-ghost pull-up resistors (SWx) - is31fl3733_write_register(addr, IS31FL3733_REG_SWPULLUP, IS31FL3733_SWPULLUP); + is31fl3733_write_register(addr, IS31FL3733_REG_SW_PULLUP, IS31FL3733_SW_PULLUP); // Set de-ghost pull-down resistors (CSx) - is31fl3733_write_register(addr, IS31FL3733_REG_CSPULLUP, IS31FL3733_CSPULLUP); + is31fl3733_write_register(addr, IS31FL3733_REG_CS_PULLDOWN, IS31FL3733_CS_PULLDOWN); // Set global current to maximum. is31fl3733_write_register(addr, IS31FL3733_REG_GLOBALCURRENT, IS31FL3733_GLOBALCURRENT); // Disable software shutdown. diff --git a/drivers/led/issi/is31fl3733-simple.h b/drivers/led/issi/is31fl3733-simple.h index 65d3298a50e..2c6014455f0 100644 --- a/drivers/led/issi/is31fl3733-simple.h +++ b/drivers/led/issi/is31fl3733-simple.h @@ -39,10 +39,10 @@ # define IS31FL3733_PWM_FREQUENCY ISSI_PWM_FREQUENCY #endif #ifdef ISSI_SWPULLUP -# define IS31FL3733_SWPULLUP ISSI_SWPULLUP +# define IS31FL3733_SW_PULLUP ISSI_SWPULLUP #endif #ifdef ISSI_CSPULLUP -# define IS31FL3733_CSPULLUP ISSI_CSPULLUP +# define IS31FL3733_CS_PULLDOWN ISSI_CSPULLUP #endif #ifdef ISSI_GLOBALCURRENT # define IS31FL3733_GLOBALCURRENT ISSI_GLOBALCURRENT @@ -51,13 +51,13 @@ #define is31_led is31fl3733_led_t #define g_is31_leds g_is31fl3733_leds -#define PUR_0R IS31FL3733_PUR_0R -#define PUR_05KR IS31FL3733_PUR_05KR -#define PUR_3KR IS31FL3733_PUR_3KR -#define PUR_4KR IS31FL3733_PUR_4KR -#define PUR_8KR IS31FL3733_PUR_8KR -#define PUR_16KR IS31FL3733_PUR_16KR -#define PUR_32KR IS31FL3733_PUR_32KR +#define PUR_0R IS31FL3733_PUR_0_OHM +#define PUR_05KR IS31FL3733_PUR_1K_OHM +#define PUR_3KR IS31FL3733_PUR_2K_OHM +#define PUR_4KR IS31FL3733_PUR_4K_OHM +#define PUR_8KR IS31FL3733_PUR_8K_OHM +#define PUR_16KR IS31FL3733_PUR_16K_OHM +#define PUR_32KR IS31FL3733_PUR_32K_OHM // ======== #define IS31FL3733_I2C_ADDRESS_GND_GND 0x50 @@ -107,13 +107,23 @@ void is31fl3733_update_led_control_registers(uint8_t addr, uint8_t index); void is31fl3733_flush(void); -#define IS31FL3733_PUR_0R 0x00 // No PUR resistor -#define IS31FL3733_PUR_05KR 0x02 // 0.5k Ohm resistor in t_NOL -#define IS31FL3733_PUR_3KR 0x03 // 3.0k Ohm resistor on all the time -#define IS31FL3733_PUR_4KR 0x04 // 4.0k Ohm resistor on all the time -#define IS31FL3733_PUR_8KR 0x05 // 8.0k Ohm resistor on all the time -#define IS31FL3733_PUR_16KR 0x06 // 16k Ohm resistor on all the time -#define IS31FL3733_PUR_32KR 0x07 // 32k Ohm resistor in t_NOL +#define IS31FL3733_PDR_0_OHM 0b000 // No pull-down resistor +#define IS31FL3733_PDR_0K5_OHM 0b001 // 0.5 kOhm resistor +#define IS31FL3733_PDR_1K_OHM 0b010 // 1 kOhm resistor +#define IS31FL3733_PDR_2K_OHM 0b011 // 2 kOhm resistor +#define IS31FL3733_PDR_4K_OHM 0b100 // 4 kOhm resistor +#define IS31FL3733_PDR_8K_OHM 0b101 // 8 kOhm resistor +#define IS31FL3733_PDR_16K_OHM 0b110 // 16 kOhm resistor +#define IS31FL3733_PDR_32K_OHM 0b111 // 32 kOhm resistor + +#define IS31FL3733_PUR_0_OHM 0b000 // No pull-up resistor +#define IS31FL3733_PUR_0K5_OHM 0b001 // 0.5 kOhm resistor +#define IS31FL3733_PUR_1K_OHM 0b010 // 1 kOhm resistor +#define IS31FL3733_PUR_2K_OHM 0b011 // 2 kOhm resistor +#define IS31FL3733_PUR_4K_OHM 0b100 // 4 kOhm resistor +#define IS31FL3733_PUR_8K_OHM 0b101 // 8 kOhm resistor +#define IS31FL3733_PUR_16K_OHM 0b110 // 16 kOhm resistor +#define IS31FL3733_PUR_32K_OHM 0b111 // 32 kOhm resistor #define IS31FL3733_PWM_FREQUENCY_8K4_HZ 0b000 #define IS31FL3733_PWM_FREQUENCY_4K2_HZ 0b001 diff --git a/drivers/led/issi/is31fl3733.c b/drivers/led/issi/is31fl3733.c index 729d2bc57ce..5a5f352a6ab 100644 --- a/drivers/led/issi/is31fl3733.c +++ b/drivers/led/issi/is31fl3733.c @@ -35,8 +35,8 @@ #define IS31FL3733_REG_CONFIGURATION 0x00 // PG3 #define IS31FL3733_REG_GLOBALCURRENT 0x01 // PG3 #define IS31FL3733_REG_RESET 0x11 // PG3 -#define IS31FL3733_REG_SWPULLUP 0x0F // PG3 -#define IS31FL3733_REG_CSPULLUP 0x10 // PG3 +#define IS31FL3733_REG_SW_PULLUP 0x0F // PG3 +#define IS31FL3733_REG_CS_PULLDOWN 0x10 // PG3 #define IS31FL3733_PWM_REGISTER_COUNT 192 #define IS31FL3733_LED_CONTROL_REGISTER_COUNT 24 @@ -53,12 +53,12 @@ # define IS31FL3733_PWM_FREQUENCY IS31FL3733_PWM_FREQUENCY_8K4_HZ // PFS - IS31FL3733B only #endif -#ifndef IS31FL3733_SWPULLUP -# define IS31FL3733_SWPULLUP IS31FL3733_PUR_0R +#ifndef IS31FL3733_SW_PULLUP +# define IS31FL3733_SW_PULLUP IS31FL3733_PUR_0_OHM #endif -#ifndef IS31FL3733_CSPULLUP -# define IS31FL3733_CSPULLUP IS31FL3733_PUR_0R +#ifndef IS31FL3733_CS_PULLDOWN +# define IS31FL3733_CS_PULLDOWN IS31FL3733_PDR_0_OHM #endif #ifndef IS31FL3733_GLOBALCURRENT @@ -205,9 +205,9 @@ void is31fl3733_init(uint8_t addr, uint8_t sync) { // Select PG3 is31fl3733_write_register(addr, IS31FL3733_COMMANDREGISTER, IS31FL3733_PAGE_FUNCTION); // Set de-ghost pull-up resistors (SWx) - is31fl3733_write_register(addr, IS31FL3733_REG_SWPULLUP, IS31FL3733_SWPULLUP); + is31fl3733_write_register(addr, IS31FL3733_REG_SW_PULLUP, IS31FL3733_SW_PULLUP); // Set de-ghost pull-down resistors (CSx) - is31fl3733_write_register(addr, IS31FL3733_REG_CSPULLUP, IS31FL3733_CSPULLUP); + is31fl3733_write_register(addr, IS31FL3733_REG_CS_PULLDOWN, IS31FL3733_CS_PULLDOWN); // Set global current to maximum. is31fl3733_write_register(addr, IS31FL3733_REG_GLOBALCURRENT, IS31FL3733_GLOBALCURRENT); // Disable software shutdown. diff --git a/drivers/led/issi/is31fl3733.h b/drivers/led/issi/is31fl3733.h index a8407f21548..a87d790c446 100644 --- a/drivers/led/issi/is31fl3733.h +++ b/drivers/led/issi/is31fl3733.h @@ -62,10 +62,10 @@ # define IS31FL3733_PWM_FREQUENCY ISSI_PWM_FREQUENCY #endif #ifdef ISSI_SWPULLUP -# define IS31FL3733_SWPULLUP ISSI_SWPULLUP +# define IS31FL3733_SW_PULLUP ISSI_SWPULLUP #endif #ifdef ISSI_CSPULLUP -# define IS31FL3733_CSPULLUP ISSI_CSPULLUP +# define IS31FL3733_CS_PULLDOWN ISSI_CSPULLUP #endif #ifdef ISSI_GLOBALCURRENT # define IS31FL3733_GLOBALCURRENT ISSI_GLOBALCURRENT @@ -74,13 +74,13 @@ #define is31_led is31fl3733_led_t #define g_is31_leds g_is31fl3733_leds -#define PUR_0R IS31FL3733_PUR_0R -#define PUR_05KR IS31FL3733_PUR_05KR -#define PUR_3KR IS31FL3733_PUR_3KR -#define PUR_4KR IS31FL3733_PUR_4KR -#define PUR_8KR IS31FL3733_PUR_8KR -#define PUR_16KR IS31FL3733_PUR_16KR -#define PUR_32KR IS31FL3733_PUR_32KR +#define PUR_0R IS31FL3733_PUR_0_OHM +#define PUR_05KR IS31FL3733_PUR_1K_OHM +#define PUR_3KR IS31FL3733_PUR_2K_OHM +#define PUR_4KR IS31FL3733_PUR_4K_OHM +#define PUR_8KR IS31FL3733_PUR_8K_OHM +#define PUR_16KR IS31FL3733_PUR_16K_OHM +#define PUR_32KR IS31FL3733_PUR_32K_OHM // ======== #define IS31FL3733_I2C_ADDRESS_GND_GND 0x50 @@ -132,13 +132,23 @@ void is31fl3733_update_led_control_registers(uint8_t addr, uint8_t index); void is31fl3733_flush(void); -#define IS31FL3733_PUR_0R 0x00 // No PUR resistor -#define IS31FL3733_PUR_05KR 0x02 // 0.5k Ohm resistor in t_NOL -#define IS31FL3733_PUR_3KR 0x03 // 3.0k Ohm resistor on all the time -#define IS31FL3733_PUR_4KR 0x04 // 4.0k Ohm resistor on all the time -#define IS31FL3733_PUR_8KR 0x05 // 8.0k Ohm resistor on all the time -#define IS31FL3733_PUR_16KR 0x06 // 16k Ohm resistor on all the time -#define IS31FL3733_PUR_32KR 0x07 // 32k Ohm resistor in t_NOL +#define IS31FL3733_PDR_0_OHM 0b000 // No pull-down resistor +#define IS31FL3733_PDR_0K5_OHM 0b001 // 0.5 kOhm resistor +#define IS31FL3733_PDR_1K_OHM 0b010 // 1 kOhm resistor +#define IS31FL3733_PDR_2K_OHM 0b011 // 2 kOhm resistor +#define IS31FL3733_PDR_4K_OHM 0b100 // 4 kOhm resistor +#define IS31FL3733_PDR_8K_OHM 0b101 // 8 kOhm resistor +#define IS31FL3733_PDR_16K_OHM 0b110 // 16 kOhm resistor +#define IS31FL3733_PDR_32K_OHM 0b111 // 32 kOhm resistor + +#define IS31FL3733_PUR_0_OHM 0b000 // No pull-up resistor +#define IS31FL3733_PUR_0K5_OHM 0b001 // 0.5 kOhm resistor +#define IS31FL3733_PUR_1K_OHM 0b010 // 1 kOhm resistor +#define IS31FL3733_PUR_2K_OHM 0b011 // 2 kOhm resistor +#define IS31FL3733_PUR_4K_OHM 0b100 // 4 kOhm resistor +#define IS31FL3733_PUR_8K_OHM 0b101 // 8 kOhm resistor +#define IS31FL3733_PUR_16K_OHM 0b110 // 16 kOhm resistor +#define IS31FL3733_PUR_32K_OHM 0b111 // 32 kOhm resistor #define IS31FL3733_PWM_FREQUENCY_8K4_HZ 0b000 #define IS31FL3733_PWM_FREQUENCY_4K2_HZ 0b001 diff --git a/drivers/led/issi/is31fl3736-simple.c b/drivers/led/issi/is31fl3736-simple.c index 45daaf31875..e0d76d07c6d 100644 --- a/drivers/led/issi/is31fl3736-simple.c +++ b/drivers/led/issi/is31fl3736-simple.c @@ -33,8 +33,8 @@ #define IS31FL3736_REG_CONFIGURATION 0x00 // PG3 #define IS31FL3736_REG_GLOBALCURRENT 0x01 // PG3 #define IS31FL3736_REG_RESET 0x11 // PG3 -#define IS31FL3736_REG_SWPULLUP 0x0F // PG3 -#define IS31FL3736_REG_CSPULLUP 0x10 // PG3 +#define IS31FL3736_REG_SW_PULLUP 0x0F // PG3 +#define IS31FL3736_REG_CS_PULLDOWN 0x10 // PG3 #define IS31FL3736_PWM_REGISTER_COUNT 192 // actually 96 #define IS31FL3736_LED_CONTROL_REGISTER_COUNT 24 @@ -51,12 +51,12 @@ # define IS31FL3736_PWM_FREQUENCY IS31FL3736_PWM_FREQUENCY_8K4_HZ // PFS - IS31FL3736B only #endif -#ifndef IS31FL3736_SWPULLUP -# define IS31FL3736_SWPULLUP IS31FL3736_PUR_0R +#ifndef IS31FL3736_SW_PULLUP +# define IS31FL3736_SW_PULLUP IS31FL3736_PUR_0_OHM #endif -#ifndef IS31FL3736_CSPULLUP -# define IS31FL3736_CSPULLUP IS31FL3736_PUR_0R +#ifndef IS31FL3736_CS_PULLDOWN +# define IS31FL3736_CS_PULLDOWN IS31FL3736_PDR_0_OHM #endif #ifndef IS31FL3736_GLOBALCURRENT @@ -178,9 +178,9 @@ void is31fl3736_init(uint8_t addr) { // Select PG3 is31fl3736_write_register(addr, IS31FL3736_COMMANDREGISTER, IS31FL3736_PAGE_FUNCTION); // Set de-ghost pull-up resistors (SWx) - is31fl3736_write_register(addr, IS31FL3736_REG_SWPULLUP, IS31FL3736_SWPULLUP); + is31fl3736_write_register(addr, IS31FL3736_REG_SW_PULLUP, IS31FL3736_SW_PULLUP); // Set de-ghost pull-down resistors (CSx) - is31fl3736_write_register(addr, IS31FL3736_REG_CSPULLUP, IS31FL3736_CSPULLUP); + is31fl3736_write_register(addr, IS31FL3736_REG_CS_PULLDOWN, IS31FL3736_CS_PULLDOWN); // Set global current to maximum. is31fl3736_write_register(addr, IS31FL3736_REG_GLOBALCURRENT, IS31FL3736_GLOBALCURRENT); // Disable software shutdown. diff --git a/drivers/led/issi/is31fl3736-simple.h b/drivers/led/issi/is31fl3736-simple.h index cb751a917ef..7e3e728641f 100644 --- a/drivers/led/issi/is31fl3736-simple.h +++ b/drivers/led/issi/is31fl3736-simple.h @@ -33,10 +33,10 @@ # define IS31FL3736_I2C_PERSISTENCE ISSI_PERSISTENCE #endif #ifdef ISSI_SWPULLUP -# define IS31FL3736_SWPULLUP ISSI_SWPULLUP +# define IS31FL3736_SW_PULLUP ISSI_SWPULLUP #endif #ifdef ISSI_CSPULLUP -# define IS31FL3736_CSPULLUP ISSI_CSPULLUP +# define IS31FL3736_CS_PULLDOWN ISSI_CSPULLUP #endif #ifdef ISSI_GLOBALCURRENT # define IS31FL3736_GLOBALCURRENT ISSI_GLOBALCURRENT @@ -45,14 +45,14 @@ #define is31_led is31fl3736_led_t #define g_is31_leds g_is31fl3736_leds -#define PUR_0R IS31FL3736_PUR_0R -#define PUR_05KR IS31FL3736_PUR_05KR -#define PUR_1KR IS31FL3736_PUR_1KR -#define PUR_2KR IS31FL3736_PUR_2KR -#define PUR_4KR IS31FL3736_PUR_4KR -#define PUR_8KR IS31FL3736_PUR_8KR -#define PUR_16KR IS31FL3736_PUR_16KR -#define PUR_32KR IS31FL3736_PUR_32KR +#define PUR_0R IS31FL3736_PUR_0_OHM +#define PUR_05KR IS31FL3736_PUR_05K_OHM +#define PUR_1KR IS31FL3736_PUR_1K_OHM +#define PUR_2KR IS31FL3736_PUR_2K_OHM +#define PUR_4KR IS31FL3736_PUR_4K_OHM +#define PUR_8KR IS31FL3736_PUR_8K_OHM +#define PUR_16KR IS31FL3736_PUR_16K_OHM +#define PUR_32KR IS31FL3736_PUR_32K_OHM // ======== #define IS31FL3736_I2C_ADDRESS_GND_GND 0x50 @@ -102,14 +102,23 @@ void is31fl3736_update_led_control_registers(uint8_t addr, uint8_t index); void is31fl3736_flush(void); -#define IS31FL3736_PUR_0R 0x00 // No PUR resistor -#define IS31FL3736_PUR_05KR 0x01 // 0.5k Ohm resistor -#define IS31FL3736_PUR_1KR 0x02 // 1.0k Ohm resistor -#define IS31FL3736_PUR_2KR 0x03 // 2.0k Ohm resistor -#define IS31FL3736_PUR_4KR 0x04 // 4.0k Ohm resistor -#define IS31FL3736_PUR_8KR 0x05 // 8.0k Ohm resistor -#define IS31FL3736_PUR_16KR 0x06 // 16k Ohm resistor -#define IS31FL3736_PUR_32KR 0x07 // 32k Ohm resistor +#define IS31FL3736_PDR_0_OHM 0b000 // No pull-down resistor +#define IS31FL3736_PDR_0K5_OHM 0b001 // 0.5 kOhm resistor +#define IS31FL3736_PDR_1K_OHM 0b010 // 1 kOhm resistor +#define IS31FL3736_PDR_2K_OHM 0b011 // 2 kOhm resistor +#define IS31FL3736_PDR_4K_OHM 0b100 // 4 kOhm resistor +#define IS31FL3736_PDR_8K_OHM 0b101 // 8 kOhm resistor +#define IS31FL3736_PDR_16K_OHM 0b110 // 16 kOhm resistor +#define IS31FL3736_PDR_32K_OHM 0b111 // 32 kOhm resistor + +#define IS31FL3736_PUR_0_OHM 0b000 // No pull-up resistor +#define IS31FL3736_PUR_0K5_OHM 0b001 // 0.5 kOhm resistor +#define IS31FL3736_PUR_1K_OHM 0b010 // 1 kOhm resistor +#define IS31FL3736_PUR_2K_OHM 0b011 // 2 kOhm resistor +#define IS31FL3736_PUR_4K_OHM 0b100 // 4 kOhm resistor +#define IS31FL3736_PUR_8K_OHM 0b101 // 8 kOhm resistor +#define IS31FL3736_PUR_16K_OHM 0b110 // 16 kOhm resistor +#define IS31FL3736_PUR_32K_OHM 0b111 // 32 kOhm resistor #define IS31FL3736_PWM_FREQUENCY_8K4_HZ 0b000 #define IS31FL3736_PWM_FREQUENCY_4K2_HZ 0b001 diff --git a/drivers/led/issi/is31fl3736.c b/drivers/led/issi/is31fl3736.c index 36cd132d468..0e3205f19b1 100644 --- a/drivers/led/issi/is31fl3736.c +++ b/drivers/led/issi/is31fl3736.c @@ -33,8 +33,8 @@ #define IS31FL3736_REG_CONFIGURATION 0x00 // PG3 #define IS31FL3736_REG_GLOBALCURRENT 0x01 // PG3 #define IS31FL3736_REG_RESET 0x11 // PG3 -#define IS31FL3736_REG_SWPULLUP 0x0F // PG3 -#define IS31FL3736_REG_CSPULLUP 0x10 // PG3 +#define IS31FL3736_REG_SW_PULLUP 0x0F // PG3 +#define IS31FL3736_REG_CS_PULLDOWN 0x10 // PG3 #define IS31FL3736_PWM_REGISTER_COUNT 192 // actually 96 #define IS31FL3736_LED_CONTROL_REGISTER_COUNT 24 @@ -51,12 +51,12 @@ # define IS31FL3736_PWM_FREQUENCY IS31FL3736_PWM_FREQUENCY_8K4_HZ // PFS - IS31FL3736B only #endif -#ifndef IS31FL3736_SWPULLUP -# define IS31FL3736_SWPULLUP IS31FL3736_PUR_0R +#ifndef IS31FL3736_SW_PULLUP +# define IS31FL3736_SW_PULLUP IS31FL3736_PUR_0_OHM #endif -#ifndef IS31FL3736_CSPULLUP -# define IS31FL3736_CSPULLUP IS31FL3736_PUR_0R +#ifndef IS31FL3736_CS_PULLDOWN +# define IS31FL3736_CS_PULLDOWN IS31FL3736_PDR_0_OHM #endif #ifndef IS31FL3736_GLOBALCURRENT @@ -178,9 +178,9 @@ void is31fl3736_init(uint8_t addr) { // Select PG3 is31fl3736_write_register(addr, IS31FL3736_COMMANDREGISTER, IS31FL3736_PAGE_FUNCTION); // Set de-ghost pull-up resistors (SWx) - is31fl3736_write_register(addr, IS31FL3736_REG_SWPULLUP, IS31FL3736_SWPULLUP); + is31fl3736_write_register(addr, IS31FL3736_REG_SW_PULLUP, IS31FL3736_SW_PULLUP); // Set de-ghost pull-down resistors (CSx) - is31fl3736_write_register(addr, IS31FL3736_REG_CSPULLUP, IS31FL3736_CSPULLUP); + is31fl3736_write_register(addr, IS31FL3736_REG_CS_PULLDOWN, IS31FL3736_CS_PULLDOWN); // Set global current to maximum. is31fl3736_write_register(addr, IS31FL3736_REG_GLOBALCURRENT, IS31FL3736_GLOBALCURRENT); // Disable software shutdown. diff --git a/drivers/led/issi/is31fl3736.h b/drivers/led/issi/is31fl3736.h index 79d8c3276df..bdb787494df 100644 --- a/drivers/led/issi/is31fl3736.h +++ b/drivers/led/issi/is31fl3736.h @@ -45,10 +45,10 @@ # define IS31FL3736_I2C_PERSISTENCE ISSI_PERSISTENCE #endif #ifdef ISSI_SWPULLUP -# define IS31FL3736_SWPULLUP ISSI_SWPULLUP +# define IS31FL3736_SW_PULLUP ISSI_SWPULLUP #endif #ifdef ISSI_CSPULLUP -# define IS31FL3736_CSPULLUP ISSI_CSPULLUP +# define IS31FL3736_CS_PULLDOWN ISSI_CSPULLUP #endif #ifdef ISSI_GLOBALCURRENT # define IS31FL3736_GLOBALCURRENT ISSI_GLOBALCURRENT @@ -57,14 +57,14 @@ #define is31_led is31fl3736_led_t #define g_is31_leds g_is31fl3736_leds -#define PUR_0R IS31FL3736_PUR_0R -#define PUR_05KR IS31FL3736_PUR_05KR -#define PUR_1KR IS31FL3736_PUR_1KR -#define PUR_2KR IS31FL3736_PUR_2KR -#define PUR_4KR IS31FL3736_PUR_4KR -#define PUR_8KR IS31FL3736_PUR_8KR -#define PUR_16KR IS31FL3736_PUR_16KR -#define PUR_32KR IS31FL3736_PUR_32KR +#define PUR_0R IS31FL3736_PUR_0_OHM +#define PUR_05KR IS31FL3736_PUR_0K5_OHM +#define PUR_1KR IS31FL3736_PUR_1K_OHM +#define PUR_2KR IS31FL3736_PUR_2K_OHM +#define PUR_4KR IS31FL3736_PUR_4K_OHM +#define PUR_8KR IS31FL3736_PUR_8K_OHM +#define PUR_16KR IS31FL3736_PUR_16K_OHM +#define PUR_32KR IS31FL3736_PUR_32K_OHM // ======== #define IS31FL3736_I2C_ADDRESS_GND_GND 0x50 @@ -116,14 +116,23 @@ void is31fl3736_update_led_control_registers(uint8_t addr, uint8_t index); void is31fl3736_flush(void); -#define IS31FL3736_PUR_0R 0x00 // No PUR resistor -#define IS31FL3736_PUR_05KR 0x01 // 0.5k Ohm resistor -#define IS31FL3736_PUR_1KR 0x02 // 1.0k Ohm resistor -#define IS31FL3736_PUR_2KR 0x03 // 2.0k Ohm resistor -#define IS31FL3736_PUR_4KR 0x04 // 4.0k Ohm resistor -#define IS31FL3736_PUR_8KR 0x05 // 8.0k Ohm resistor -#define IS31FL3736_PUR_16KR 0x06 // 16k Ohm resistor -#define IS31FL3736_PUR_32KR 0x07 // 32k Ohm resistor +#define IS31FL3736_PDR_0_OHM 0b000 // No pull-down resistor +#define IS31FL3736_PDR_0K5_OHM 0b001 // 0.5 kOhm resistor +#define IS31FL3736_PDR_1K_OHM 0b010 // 1 kOhm resistor +#define IS31FL3736_PDR_2K_OHM 0b011 // 2 kOhm resistor +#define IS31FL3736_PDR_4K_OHM 0b100 // 4 kOhm resistor +#define IS31FL3736_PDR_8K_OHM 0b101 // 8 kOhm resistor +#define IS31FL3736_PDR_16K_OHM 0b110 // 16 kOhm resistor +#define IS31FL3736_PDR_32K_OHM 0b111 // 32 kOhm resistor + +#define IS31FL3736_PUR_0_OHM 0b000 // No pull-up resistor +#define IS31FL3736_PUR_0K5_OHM 0b001 // 0.5 kOhm resistor +#define IS31FL3736_PUR_1K_OHM 0b010 // 1 kOhm resistor +#define IS31FL3736_PUR_2K_OHM 0b011 // 2 kOhm resistor +#define IS31FL3736_PUR_4K_OHM 0b100 // 4 kOhm resistor +#define IS31FL3736_PUR_8K_OHM 0b101 // 8 kOhm resistor +#define IS31FL3736_PUR_16K_OHM 0b110 // 16 kOhm resistor +#define IS31FL3736_PUR_32K_OHM 0b111 // 32 kOhm resistor #define IS31FL3736_PWM_FREQUENCY_8K4_HZ 0b000 #define IS31FL3736_PWM_FREQUENCY_4K2_HZ 0b001 diff --git a/drivers/led/issi/is31fl3737-simple.c b/drivers/led/issi/is31fl3737-simple.c index 0549af16f2e..904b7c65bd8 100644 --- a/drivers/led/issi/is31fl3737-simple.c +++ b/drivers/led/issi/is31fl3737-simple.c @@ -35,8 +35,8 @@ #define IS31FL3737_REG_CONFIGURATION 0x00 // PG3 #define IS31FL3737_REG_GLOBALCURRENT 0x01 // PG3 #define IS31FL3737_REG_RESET 0x11 // PG3 -#define IS31FL3737_REG_SWPULLUP 0x0F // PG3 -#define IS31FL3737_REG_CSPULLUP 0x10 // PG3 +#define IS31FL3737_REG_SW_PULLUP 0x0F // PG3 +#define IS31FL3737_REG_CS_PULLDOWN 0x10 // PG3 #define IS31FL3737_PWM_REGISTER_COUNT 192 // actually 144 #define IS31FL3737_LED_CONTROL_REGISTER_COUNT 24 @@ -53,12 +53,12 @@ # define IS31FL3737_PWM_FREQUENCY IS31FL3737_PWM_FREQUENCY_8K4_HZ // PFS - IS31FL3737B only #endif -#ifndef IS31FL3737_SWPULLUP -# define IS31FL3737_SWPULLUP IS31FL3737_PUR_0R +#ifndef IS31FL3737_SW_PULLUP +# define IS31FL3737_SW_PULLUP IS31FL3737_PUR_0_OHM #endif -#ifndef IS31FL3737_CSPULLUP -# define IS31FL3737_CSPULLUP IS31FL3737_PUR_0R +#ifndef IS31FL3737_CS_PULLDOWN +# define IS31FL3737_CS_PULLDOWN IS31FL3737_PDR_0_OHM #endif #ifndef IS31FL3737_GLOBALCURRENT @@ -181,9 +181,9 @@ void is31fl3737_init(uint8_t addr) { // Select PG3 is31fl3737_write_register(addr, IS31FL3737_COMMANDREGISTER, IS31FL3737_PAGE_FUNCTION); // Set de-ghost pull-up resistors (SWx) - is31fl3737_write_register(addr, IS31FL3737_REG_SWPULLUP, IS31FL3737_SWPULLUP); + is31fl3737_write_register(addr, IS31FL3737_REG_SW_PULLUP, IS31FL3737_SW_PULLUP); // Set de-ghost pull-down resistors (CSx) - is31fl3737_write_register(addr, IS31FL3737_REG_CSPULLUP, IS31FL3737_CSPULLUP); + is31fl3737_write_register(addr, IS31FL3737_REG_CS_PULLDOWN, IS31FL3737_CS_PULLDOWN); // Set global current to maximum. is31fl3737_write_register(addr, IS31FL3737_REG_GLOBALCURRENT, IS31FL3737_GLOBALCURRENT); // Disable software shutdown. diff --git a/drivers/led/issi/is31fl3737-simple.h b/drivers/led/issi/is31fl3737-simple.h index dfc2189decb..3262987697b 100644 --- a/drivers/led/issi/is31fl3737-simple.h +++ b/drivers/led/issi/is31fl3737-simple.h @@ -38,23 +38,23 @@ # define IS31FL3737_PWM_FREQUENCY ISSI_PWM_FREQUENCY #endif #ifdef ISSI_SWPULLUP -# define IS31FL3737_SWPULLUP ISSI_SWPULLUP +# define IS31FL3737_SW_PULLUP ISSI_SWPULLUP #endif #ifdef ISSI_CSPULLUP -# define IS31FL3737_CSPULLUP ISSI_CSPULLUP +# define IS31FL3737_CS_PULLDOWN ISSI_CSPULLUP #endif #ifdef ISSI_GLOBALCURRENT # define IS31FL3737_GLOBALCURRENT ISSI_GLOBALCURRENT #endif -#define PUR_0R IS31FL3737_PUR_0R -#define PUR_05KR IS31FL3737_PUR_05KR -#define PUR_1KR IS31FL3737_PUR_1KR -#define PUR_2KR IS31FL3737_PUR_2KR -#define PUR_4KR IS31FL3737_PUR_4KR -#define PUR_8KR IS31FL3737_PUR_8KR -#define PUR_16KR IS31FL3737_PUR_16KR -#define PUR_32KR IS31FL3737_PUR_32KR +#define PUR_0R IS31FL3737_PUR_0_OHM +#define PUR_05KR IS31FL3737_PUR_0K5_OHM +#define PUR_1KR IS31FL3737_PUR_1K_OHM +#define PUR_2KR IS31FL3737_PUR_2K_OHM +#define PUR_4KR IS31FL3737_PUR_4K_OHM +#define PUR_8KR IS31FL3737_PUR_8K_OHM +#define PUR_16KR IS31FL3737_PUR_16K_OHM +#define PUR_32KR IS31FL3737_PUR_32K_OHM // ======== #define IS31FL3737_I2C_ADDRESS_GND 0x50 @@ -92,14 +92,23 @@ void is31fl3737_update_led_control_registers(uint8_t addr, uint8_t index); void is31fl3737_flush(void); -#define IS31FL3737_PUR_0R 0x00 // No PUR resistor -#define IS31FL3737_PUR_05KR 0x01 // 0.5k Ohm resistor in t_NOL -#define IS31FL3737_PUR_1KR 0x02 // 1.0k Ohm resistor in t_NOL -#define IS31FL3737_PUR_2KR 0x03 // 2.0k Ohm resistor in t_NOL -#define IS31FL3737_PUR_4KR 0x04 // 4.0k Ohm resistor in t_NOL -#define IS31FL3737_PUR_8KR 0x05 // 8.0k Ohm resistor in t_NOL -#define IS31FL3737_PUR_16KR 0x06 // 16k Ohm resistor in t_NOL -#define IS31FL3737_PUR_32KR 0x07 // 32k Ohm resistor in t_NOL +#define IS31FL3737_PDR_0_OHM 0b000 // No pull-down resistor +#define IS31FL3737_PDR_0K5_OHM 0b001 // 0.5 kOhm resistor +#define IS31FL3737_PDR_1K_OHM 0b010 // 1 kOhm resistor +#define IS31FL3737_PDR_2K_OHM 0b011 // 2 kOhm resistor +#define IS31FL3737_PDR_4K_OHM 0b100 // 4 kOhm resistor +#define IS31FL3737_PDR_8K_OHM 0b101 // 8 kOhm resistor +#define IS31FL3737_PDR_16K_OHM 0b110 // 16 kOhm resistor +#define IS31FL3737_PDR_32K_OHM 0b111 // 32 kOhm resistor + +#define IS31FL3737_PUR_0_OHM 0b000 // No pull-up resistor +#define IS31FL3737_PUR_0K5_OHM 0b001 // 0.5 kOhm resistor +#define IS31FL3737_PUR_1K_OHM 0b010 // 1 kOhm resistor +#define IS31FL3737_PUR_2K_OHM 0b011 // 2 kOhm resistor +#define IS31FL3737_PUR_4K_OHM 0b100 // 4 kOhm resistor +#define IS31FL3737_PUR_8K_OHM 0b101 // 8 kOhm resistor +#define IS31FL3737_PUR_16K_OHM 0b110 // 16 kOhm resistor +#define IS31FL3737_PUR_32K_OHM 0b111 // 32 kOhm resistor #define IS31FL3737_PWM_FREQUENCY_8K4_HZ 0b000 #define IS31FL3737_PWM_FREQUENCY_4K2_HZ 0b001 diff --git a/drivers/led/issi/is31fl3737.c b/drivers/led/issi/is31fl3737.c index 1599e59058f..27860558a57 100644 --- a/drivers/led/issi/is31fl3737.c +++ b/drivers/led/issi/is31fl3737.c @@ -35,8 +35,8 @@ #define IS31FL3737_REG_CONFIGURATION 0x00 // PG3 #define IS31FL3737_REG_GLOBALCURRENT 0x01 // PG3 #define IS31FL3737_REG_RESET 0x11 // PG3 -#define IS31FL3737_REG_SWPULLUP 0x0F // PG3 -#define IS31FL3737_REG_CSPULLUP 0x10 // PG3 +#define IS31FL3737_REG_SW_PULLUP 0x0F // PG3 +#define IS31FL3737_REG_CS_PULLDOWN 0x10 // PG3 #define IS31FL3737_PWM_REGISTER_COUNT 192 // actually 144 #define IS31FL3737_LED_CONTROL_REGISTER_COUNT 24 @@ -53,12 +53,12 @@ # define IS31FL3737_PWM_FREQUENCY IS31FL3737_PWM_FREQUENCY_8K4_HZ // PFS - IS31FL3737B only #endif -#ifndef IS31FL3737_SWPULLUP -# define IS31FL3737_SWPULLUP IS31FL3737_PUR_0R +#ifndef IS31FL3737_SW_PULLUP +# define IS31FL3737_SW_PULLUP IS31FL3737_PUR_0_OHM #endif -#ifndef IS31FL3737_CSPULLUP -# define IS31FL3737_CSPULLUP IS31FL3737_PUR_0R +#ifndef IS31FL3737_CS_PULLDONW +# define IS31FL3737_CS_PULLDOWN IS31FL3737_PDR_0_OHM #endif #ifndef IS31FL3737_GLOBALCURRENT @@ -181,9 +181,9 @@ void is31fl3737_init(uint8_t addr) { // Select PG3 is31fl3737_write_register(addr, IS31FL3737_COMMANDREGISTER, IS31FL3737_PAGE_FUNCTION); // Set de-ghost pull-up resistors (SWx) - is31fl3737_write_register(addr, IS31FL3737_REG_SWPULLUP, IS31FL3737_SWPULLUP); + is31fl3737_write_register(addr, IS31FL3737_REG_SW_PULLUP, IS31FL3737_SW_PULLUP); // Set de-ghost pull-down resistors (CSx) - is31fl3737_write_register(addr, IS31FL3737_REG_CSPULLUP, IS31FL3737_CSPULLUP); + is31fl3737_write_register(addr, IS31FL3737_REG_CS_PULLDOWN, IS31FL3737_CS_PULLDOWN); // Set global current to maximum. is31fl3737_write_register(addr, IS31FL3737_REG_GLOBALCURRENT, IS31FL3737_GLOBALCURRENT); // Disable software shutdown. diff --git a/drivers/led/issi/is31fl3737.h b/drivers/led/issi/is31fl3737.h index 38482584e03..17d2635dd86 100644 --- a/drivers/led/issi/is31fl3737.h +++ b/drivers/led/issi/is31fl3737.h @@ -50,10 +50,10 @@ # define IS31FL3737_PWM_FREQUENCY ISSI_PWM_FREQUENCY #endif #ifdef ISSI_SWPULLUP -# define IS31FL3737_SWPULLUP ISSI_SWPULLUP +# define IS31FL3737_SW_PULLUP ISSI_SWPULLUP #endif #ifdef ISSI_CSPULLUP -# define IS31FL3737_CSPULLUP ISSI_CSPULLUP +# define IS31FL3737_CS_PULLDOWN ISSI_CSPULLUP #endif #ifdef ISSI_GLOBALCURRENT # define IS31FL3737_GLOBALCURRENT ISSI_GLOBALCURRENT @@ -62,14 +62,14 @@ #define is31_led is31fl3737_led_t #define g_is31_leds g_is31fl3737_leds -#define PUR_0R IS31FL3737_PUR_0R -#define PUR_05KR IS31FL3737_PUR_05KR -#define PUR_1KR IS31FL3737_PUR_1KR -#define PUR_2KR IS31FL3737_PUR_2KR -#define PUR_4KR IS31FL3737_PUR_4KR -#define PUR_8KR IS31FL3737_PUR_8KR -#define PUR_16KR IS31FL3737_PUR_16KR -#define PUR_32KR IS31FL3737_PUR_32KR +#define PUR_0R IS31FL3737_PUR_0_OHM +#define PUR_05KR IS31FL3737_PUR_0K5_OHM +#define PUR_1KR IS31FL3737_PUR_1K_OHM +#define PUR_2KR IS31FL3737_PUR_2K_OHM +#define PUR_4KR IS31FL3737_PUR_4K_OHM +#define PUR_8KR IS31FL3737_PUR_8K_OHM +#define PUR_16KR IS31FL3737_PUR_16K_OHM +#define PUR_32KR IS31FL3737_PUR_32K_OHM // ======== #define IS31FL3737_I2C_ADDRESS_GND 0x50 @@ -109,14 +109,23 @@ void is31fl3737_update_led_control_registers(uint8_t addr, uint8_t index); void is31fl3737_flush(void); -#define IS31FL3737_PUR_0R 0x00 // No PUR resistor -#define IS31FL3737_PUR_05KR 0x01 // 0.5k Ohm resistor in t_NOL -#define IS31FL3737_PUR_1KR 0x02 // 1.0k Ohm resistor in t_NOL -#define IS31FL3737_PUR_2KR 0x03 // 2.0k Ohm resistor in t_NOL -#define IS31FL3737_PUR_4KR 0x04 // 4.0k Ohm resistor in t_NOL -#define IS31FL3737_PUR_8KR 0x05 // 8.0k Ohm resistor in t_NOL -#define IS31FL3737_PUR_16KR 0x06 // 16k Ohm resistor in t_NOL -#define IS31FL3737_PUR_32KR 0x07 // 32k Ohm resistor in t_NOL +#define IS31FL3737_PDR_0_OHM 0b000 // No pull-down resistor +#define IS31FL3737_PDR_0K5_OHM 0b001 // 0.5 kOhm resistor +#define IS31FL3737_PDR_1K_OHM 0b010 // 1 kOhm resistor +#define IS31FL3737_PDR_2K_OHM 0b011 // 2 kOhm resistor +#define IS31FL3737_PDR_4K_OHM 0b100 // 4 kOhm resistor +#define IS31FL3737_PDR_8K_OHM 0b101 // 8 kOhm resistor +#define IS31FL3737_PDR_16K_OHM 0b110 // 16 kOhm resistor +#define IS31FL3737_PDR_32K_OHM 0b111 // 32 kOhm resistor + +#define IS31FL3737_PUR_0_OHM 0b000 // No pull-up resistor +#define IS31FL3737_PUR_0K5_OHM 0b001 // 0.5 kOhm resistor +#define IS31FL3737_PUR_1K_OHM 0b010 // 1 kOhm resistor +#define IS31FL3737_PUR_2K_OHM 0b011 // 2 kOhm resistor +#define IS31FL3737_PUR_4K_OHM 0b100 // 4 kOhm resistor +#define IS31FL3737_PUR_8K_OHM 0b101 // 8 kOhm resistor +#define IS31FL3737_PUR_16K_OHM 0b110 // 16 kOhm resistor +#define IS31FL3737_PUR_32K_OHM 0b111 // 32 kOhm resistor #define IS31FL3737_PWM_FREQUENCY_8K4_HZ 0b000 #define IS31FL3737_PWM_FREQUENCY_4K2_HZ 0b001 diff --git a/drivers/led/issi/is31fl3741-simple.c b/drivers/led/issi/is31fl3741-simple.c index 83a1f12f6fd..582551c05e1 100644 --- a/drivers/led/issi/is31fl3741-simple.c +++ b/drivers/led/issi/is31fl3741-simple.c @@ -58,12 +58,12 @@ # define IS31FL3741_PWM_FREQUENCY IS31FL3741_PWM_FREQUENCY_29K_HZ #endif -#ifndef IS31FL3741_SWPULLUP -# define IS31FL3741_SWPULLUP IS31FL3741_PUR_32KR +#ifndef IS31FL3741_SW_PULLUP +# define IS31FL3741_SW_PULLUP IS31FL3741_PUR_32K_OHM #endif -#ifndef IS31FL3741_CSPULLUP -# define IS31FL3741_CSPULLUP IS31FL3741_PUR_32KR +#ifndef IS31FL3741_CS_PULLDOWN +# define IS31FL3741_CS_PULLDOWN IS31FL3741_PDR_32K_OHM #endif #ifndef IS31FL3741_GLOBALCURRENT @@ -192,7 +192,7 @@ void is31fl3741_init(uint8_t addr) { // Set Golbal Current Control Register is31fl3741_write_register(addr, IS31FL3741_REG_GLOBALCURRENT, IS31FL3741_GLOBALCURRENT); // Set Pull up & Down for SWx CSy - is31fl3741_write_register(addr, IS31FL3741_REG_PULLDOWNUP, ((IS31FL3741_CSPULLUP << 4) | IS31FL3741_SWPULLUP)); + is31fl3741_write_register(addr, IS31FL3741_REG_PULLDOWNUP, ((IS31FL3741_CS_PULLDOWN << 4) | IS31FL3741_SW_PULLUP)); // Set PWM frequency is31fl3741_write_register(addr, IS31FL3741_REG_PWM_FREQUENCY, (IS31FL3741_PWM_FREQUENCY & 0b1111)); diff --git a/drivers/led/issi/is31fl3741-simple.h b/drivers/led/issi/is31fl3741-simple.h index d022f3a865c..b8cda3da340 100644 --- a/drivers/led/issi/is31fl3741-simple.h +++ b/drivers/led/issi/is31fl3741-simple.h @@ -38,23 +38,23 @@ # define IS31FL3741_CONFIGURATION ISSI_CONFIGURATION #endif #ifdef ISSI_SWPULLUP -# define IS31FL3741_SWPULLUP ISSI_SWPULLUP +# define IS31FL3741_SW_PULLUP ISSI_SWPULLUP #endif #ifdef ISSI_CSPULLUP -# define IS31FL3741_CSPULLUP ISSI_CSPULLUP +# define IS31FL3741_CS_PULLDOWN ISSI_CSPULLUP #endif #ifdef ISSI_GLOBALCURRENT # define IS31FL3741_GLOBALCURRENT ISSI_GLOBALCURRENT #endif -#define PUR_0R IS31FL3741_PUR_0R -#define PUR_05KR IS31FL3741_PUR_05KR -#define PUR_1KR IS31FL3741_PUR_1KR -#define PUR_2KR IS31FL3741_PUR_2KR -#define PUR_4KR IS31FL3741_PUR_4KR -#define PUR_8KR IS31FL3741_PUR_8KR -#define PUR_16KR IS31FL3741_PUR_16KR -#define PUR_32KR IS31FL3741_PUR_32KR +#define PUR_0R IS31FL3741_PUR_0_OHM +#define PUR_05KR IS31FL3741_PUR_0K5_OHM +#define PUR_1KR IS31FL3741_PUR_1K_OHM +#define PUR_2KR IS31FL3741_PUR_2K_OHM +#define PUR_4KR IS31FL3741_PUR_4K_OHM +#define PUR_8KR IS31FL3741_PUR_8K_OHM +#define PUR_16KR IS31FL3741_PUR_16K_OHM +#define PUR_32KR IS31FL3741_PUR_32K_OHM // ======== #define IS31FL3741_I2C_ADDRESS_GND 0x30 @@ -95,14 +95,23 @@ void is31fl3741_set_pwm_buffer(const is31fl3741_led *pled, uint8_t value); void is31fl3741_flush(void); -#define IS31FL3741_PUR_0R 0x00 // No PUR resistor -#define IS31FL3741_PUR_05KR 0x01 // 0.5k Ohm resistor -#define IS31FL3741_PUR_1KR 0x02 // 1.0k Ohm resistor -#define IS31FL3741_PUR_2KR 0x03 // 2.0k Ohm resistor -#define IS31FL3741_PUR_4KR 0x04 // 4.0k Ohm resistor -#define IS31FL3741_PUR_8KR 0x05 // 8.0k Ohm resistor -#define IS31FL3741_PUR_16KR 0x06 // 16k Ohm resistor -#define IS31FL3741_PUR_32KR 0x07 // 32k Ohm resistor +#define IS31FL3741_PDR_0_OHM 0b000 // No pull-down resistor +#define IS31FL3741_PDR_0K5_OHM 0b001 // 0.5 kOhm resistor +#define IS31FL3741_PDR_1K_OHM 0b010 // 1 kOhm resistor +#define IS31FL3741_PDR_2K_OHM 0b011 // 2 kOhm resistor +#define IS31FL3741_PDR_4K_OHM 0b100 // 4 kOhm resistor +#define IS31FL3741_PDR_8K_OHM 0b101 // 8 kOhm resistor +#define IS31FL3741_PDR_16K_OHM 0b110 // 16 kOhm resistor +#define IS31FL3741_PDR_32K_OHM 0b111 // 32 kOhm resistor + +#define IS31FL3741_PUR_0_OHM 0b000 // No pull-up resistor +#define IS31FL3741_PUR_0K5_OHM 0b001 // 0.5 kOhm resistor +#define IS31FL3741_PUR_1K_OHM 0b010 // 1 kOhm resistor +#define IS31FL3741_PUR_2K_OHM 0b011 // 2 kOhm resistor +#define IS31FL3741_PUR_4K_OHM 0b100 // 4 kOhm resistor +#define IS31FL3741_PUR_8K_OHM 0b101 // 8 kOhm resistor +#define IS31FL3741_PUR_16K_OHM 0b110 // 16 kOhm resistor +#define IS31FL3741_PUR_32K_OHM 0b111 // 32 kOhm resistor #define IS31FL3741_PWM_FREQUENCY_29K_HZ 0b0000 #define IS31FL3741_PWM_FREQUENCY_3K6_HZ 0b0011 diff --git a/drivers/led/issi/is31fl3741.c b/drivers/led/issi/is31fl3741.c index 214cccf2ca4..9925a169c31 100644 --- a/drivers/led/issi/is31fl3741.c +++ b/drivers/led/issi/is31fl3741.c @@ -58,12 +58,12 @@ # define IS31FL3741_PWM_FREQUENCY IS31FL3741_PWM_FREQUENCY_29K_HZ #endif -#ifndef IS31FL3741_SWPULLUP -# define IS31FL3741_SWPULLUP IS31FL3741_PUR_32KR +#ifndef IS31FL3741_SW_PULLUP +# define IS31FL3741_SW_PULLUP IS31FL3741_PUR_32K_OHM #endif -#ifndef IS31FL3741_CSPULLUP -# define IS31FL3741_CSPULLUP IS31FL3741_PUR_32KR +#ifndef IS31FL3741_CS_PULLDOWN +# define IS31FL3741_CS_PULLDOWN IS31FL3741_PDR_32K_OHM #endif #ifndef IS31FL3741_GLOBALCURRENT @@ -192,7 +192,7 @@ void is31fl3741_init(uint8_t addr) { // Set Golbal Current Control Register is31fl3741_write_register(addr, IS31FL3741_REG_GLOBALCURRENT, IS31FL3741_GLOBALCURRENT); // Set Pull up & Down for SWx CSy - is31fl3741_write_register(addr, IS31FL3741_REG_PULLDOWNUP, ((IS31FL3741_CSPULLUP << 4) | IS31FL3741_SWPULLUP)); + is31fl3741_write_register(addr, IS31FL3741_REG_PULLDOWNUP, ((IS31FL3741_CS_PULLDOWN << 4) | IS31FL3741_SW_PULLUP)); // Set PWM frequency is31fl3741_write_register(addr, IS31FL3741_REG_PWM_FREQUENCY, (IS31FL3741_PWM_FREQUENCY & 0b1111)); diff --git a/drivers/led/issi/is31fl3741.h b/drivers/led/issi/is31fl3741.h index 2b0e4495547..7f3c31a8abd 100644 --- a/drivers/led/issi/is31fl3741.h +++ b/drivers/led/issi/is31fl3741.h @@ -50,10 +50,10 @@ # define IS31FL3741_CONFIGURATION ISSI_CONFIGURATION #endif #ifdef ISSI_SWPULLUP -# define IS31FL3741_SWPULLUP ISSI_SWPULLUP +# define IS31FL3741_SW_PULLUP ISSI_SWPULLUP #endif #ifdef ISSI_CSPULLUP -# define IS31FL3741_CSPULLUP ISSI_CSPULLUP +# define IS31FL3741_CS_PULLDOWN ISSI_CSPULLUP #endif #ifdef ISSI_GLOBALCURRENT # define IS31FL3741_GLOBALCURRENT ISSI_GLOBALCURRENT @@ -62,14 +62,14 @@ #define is31_led is31fl3741_led_t #define g_is31_leds g_is31fl3741_leds -#define PUR_0R IS31FL3741_PUR_0R -#define PUR_05KR IS31FL3741_PUR_05KR -#define PUR_1KR IS31FL3741_PUR_1KR -#define PUR_2KR IS31FL3741_PUR_2KR -#define PUR_4KR IS31FL3741_PUR_4KR -#define PUR_8KR IS31FL3741_PUR_8KR -#define PUR_16KR IS31FL3741_PUR_16KR -#define PUR_32KR IS31FL3741_PUR_32KR +#define PUR_0R IS31FL3741_PUR_0_OHM +#define PUR_05KR IS31FL3741_PUR_0K5_OHM +#define PUR_1KR IS31FL3741_PUR_1K_OHM +#define PUR_2KR IS31FL3741_PUR_2K_OHM +#define PUR_4KR IS31FL3741_PUR_4K_OHM +#define PUR_8KR IS31FL3741_PUR_8K_OHM +#define PUR_16KR IS31FL3741_PUR_16K_OHM +#define PUR_32KR IS31FL3741_PUR_32K_OHM // ======== #define IS31FL3741_I2C_ADDRESS_GND 0x30 @@ -112,14 +112,23 @@ void is31fl3741_set_pwm_buffer(const is31fl3741_led_t *pled, uint8_t red, uint8_ void is31fl3741_flush(void); -#define IS31FL3741_PUR_0R 0x00 // No PUR resistor -#define IS31FL3741_PUR_05KR 0x01 // 0.5k Ohm resistor -#define IS31FL3741_PUR_1KR 0x02 // 1.0k Ohm resistor -#define IS31FL3741_PUR_2KR 0x03 // 2.0k Ohm resistor -#define IS31FL3741_PUR_4KR 0x04 // 4.0k Ohm resistor -#define IS31FL3741_PUR_8KR 0x05 // 8.0k Ohm resistor -#define IS31FL3741_PUR_16KR 0x06 // 16k Ohm resistor -#define IS31FL3741_PUR_32KR 0x07 // 32k Ohm resistor +#define IS31FL3741_PDR_0_OHM 0b000 // No pull-down resistor +#define IS31FL3741_PDR_0K5_OHM 0b001 // 0.5 kOhm resistor +#define IS31FL3741_PDR_1K_OHM 0b010 // 1 kOhm resistor +#define IS31FL3741_PDR_2K_OHM 0b011 // 2 kOhm resistor +#define IS31FL3741_PDR_4K_OHM 0b100 // 4 kOhm resistor +#define IS31FL3741_PDR_8K_OHM 0b101 // 8 kOhm resistor +#define IS31FL3741_PDR_16K_OHM 0b110 // 16 kOhm resistor +#define IS31FL3741_PDR_32K_OHM 0b111 // 32 kOhm resistor + +#define IS31FL3741_PUR_0_OHM 0b000 // No pull-up resistor +#define IS31FL3741_PUR_0K5_OHM 0b001 // 0.5 kOhm resistor +#define IS31FL3741_PUR_1K_OHM 0b010 // 1 kOhm resistor +#define IS31FL3741_PUR_2K_OHM 0b011 // 2 kOhm resistor +#define IS31FL3741_PUR_4K_OHM 0b100 // 4 kOhm resistor +#define IS31FL3741_PUR_8K_OHM 0b101 // 8 kOhm resistor +#define IS31FL3741_PUR_16K_OHM 0b110 // 16 kOhm resistor +#define IS31FL3741_PUR_32K_OHM 0b111 // 32 kOhm resistor #define IS31FL3741_PWM_FREQUENCY_29K_HZ 0b0000 #define IS31FL3741_PWM_FREQUENCY_3K6_HZ 0b0011 diff --git a/keyboards/input_club/k_type/is31fl3733-dual.c b/keyboards/input_club/k_type/is31fl3733-dual.c index d9cf3b51704..8aa9344c850 100644 --- a/keyboards/input_club/k_type/is31fl3733-dual.c +++ b/keyboards/input_club/k_type/is31fl3733-dual.c @@ -33,8 +33,8 @@ #define IS31FL3733_REG_CONFIGURATION 0x00 // PG3 #define IS31FL3733_REG_GLOBALCURRENT 0x01 // PG3 #define IS31FL3733_REG_RESET 0x11 // PG3 -#define IS31FL3733_REG_SWPULLUP 0x0F // PG3 -#define IS31FL3733_REG_CSPULLUP 0x10 // PG3 +#define IS31FL3733_REG_SW_PULLUP 0x0F // PG3 +#define IS31FL3733_REG_CS_PULLDOWN 0x10 // PG3 #define IS31FL3733_PWM_REGISTER_COUNT 192 #define IS31FL3733_LED_CONTROL_REGISTER_COUNT 24 @@ -51,12 +51,12 @@ # define IS31FL3733_PWM_FREQUENCY IS31FL3733_PWM_FREQUENCY_8K4_HZ // PFS - IS31FL3733B only #endif -#ifndef IS31FL3733_SWPULLUP -# define IS31FL3733_SWPULLUP IS31FL3733_PUR_0R +#ifndef IS31FL3733_SW_PULLUP +# define IS31FL3733_SW_PULLUP IS31FL3733_PUR_0_OHM #endif -#ifndef IS31FL3733_CSPULLUP -# define IS31FL3733_CSPULLUP IS31FL3733_PUR_0R +#ifndef IS31FL3733_CS_PULLDOWN +# define IS31FL3733_CS_PULLDOWN IS31FL3733_PDR_0_OHM #endif #ifndef IS31FL3733_GLOBALCURRENT @@ -193,9 +193,9 @@ void is31fl3733_init(uint8_t bus, uint8_t addr, uint8_t sync) { // Select PG3 is31fl3733_write_register(bus, addr, IS31FL3733_COMMANDREGISTER, IS31FL3733_PAGE_FUNCTION); // Set de-ghost pull-up resistors (SWx) - is31fl3733_write_register(bus, addr, IS31FL3733_REG_SWPULLUP, IS31FL3733_SWPULLUP); + is31fl3733_write_register(bus, addr, IS31FL3733_REG_SW_PULLUP, IS31FL3733_SW_PULLUP); // Set de-ghost pull-down resistors (CSx) - is31fl3733_write_register(bus, addr, IS31FL3733_REG_CSPULLUP, IS31FL3733_CSPULLUP); + is31fl3733_write_register(bus, addr, IS31FL3733_REG_CS_PULLDOWN, IS31FL3733_CS_PULLDOWN); // Set global current to maximum. is31fl3733_write_register(bus, addr, IS31FL3733_REG_GLOBALCURRENT, IS31FL3733_GLOBALCURRENT); // Disable software shutdown. diff --git a/keyboards/input_club/k_type/is31fl3733-dual.h b/keyboards/input_club/k_type/is31fl3733-dual.h index 696c234b678..51c4492ff83 100644 --- a/keyboards/input_club/k_type/is31fl3733-dual.h +++ b/keyboards/input_club/k_type/is31fl3733-dual.h @@ -67,19 +67,29 @@ void is31fl3733_update_led_control_registers(uint8_t addr, uint8_t index); void is31fl3733_flush(void); -#define IS31FL3733_PUR_0R 0x00 // No PUR resistor -#define IS31FL3733_PUR_05KR 0x02 // 0.5k Ohm resistor in t_NOL -#define IS31FL3733_PUR_3KR 0x03 // 3.0k Ohm resistor on all the time -#define IS31FL3733_PUR_4KR 0x04 // 4.0k Ohm resistor on all the time -#define IS31FL3733_PUR_8KR 0x05 // 8.0k Ohm resistor on all the time -#define IS31FL3733_PUR_16KR 0x06 // 16k Ohm resistor on all the time -#define IS31FL3733_PUR_32KR 0x07 // 32k Ohm resistor in t_NOL +#define IS31FL3733_PDR_0_OHM 0b000 // No pull-down resistor +#define IS31FL3733_PDR_0K5_OHM 0b001 // 0.5 kOhm resistor +#define IS31FL3733_PDR_1K_OHM 0b010 // 1 kOhm resistor +#define IS31FL3733_PDR_2K_OHM 0b011 // 2 kOhm resistor +#define IS31FL3733_PDR_4K_OHM 0b100 // 4 kOhm resistor +#define IS31FL3733_PDR_8K_OHM 0b101 // 8 kOhm resistor +#define IS31FL3733_PDR_16K_OHM 0b110 // 16 kOhm resistor +#define IS31FL3733_PDR_32K_OHM 0b111 // 32 kOhm resistor -#define IS31FL3733_PWM_FREQUENCY_8K4_HZ 0x00 -#define IS31FL3733_PWM_FREQUENCY_4K2_HZ 0x01 -#define IS31FL3733_PWM_FREQUENCY_26K7_HZ 0x02 -#define IS31FL3733_PWM_FREQUENCY_2K1_HZ 0x03 -#define IS31FL3733_PWM_FREQUENCY_1K05_HZ 0x04 +#define IS31FL3733_PUR_0_OHM 0b000 // No pull-up resistor +#define IS31FL3733_PUR_0K5_OHM 0b001 // 0.5 kOhm resistor +#define IS31FL3733_PUR_1K_OHM 0b010 // 1 kOhm resistor +#define IS31FL3733_PUR_2K_OHM 0b011 // 2 kOhm resistor +#define IS31FL3733_PUR_4K_OHM 0b100 // 4 kOhm resistor +#define IS31FL3733_PUR_8K_OHM 0b101 // 8 kOhm resistor +#define IS31FL3733_PUR_16K_OHM 0b110 // 16 kOhm resistor +#define IS31FL3733_PUR_32K_OHM 0b111 // 32 kOhm resistor + +#define IS31FL3733_PWM_FREQUENCY_8K4_HZ 0b000 +#define IS31FL3733_PWM_FREQUENCY_4K2_HZ 0b001 +#define IS31FL3733_PWM_FREQUENCY_26K7_HZ 0b010 +#define IS31FL3733_PWM_FREQUENCY_2K1_HZ 0b011 +#define IS31FL3733_PWM_FREQUENCY_1K05_HZ 0b100 #define IS31FL3733_SYNC_NONE 0b00 #define IS31FL3733_SYNC_MASTER 0b01