LED drivers: clean up SWx
/CSy
pullup/down resistor config (#22381)
This commit is contained in:
parent
6b19a99a4f
commit
8136cf4bfb
18 changed files with 302 additions and 218 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue