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
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue