1
0
Fork 0

LED drivers: clean up SWx/CSy pullup/down resistor config (#22381)

This commit is contained in:
Ryan 2023-11-10 08:39:15 +11:00 committed by GitHub
parent 6b19a99a4f
commit 8136cf4bfb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 302 additions and 218 deletions

View file

@ -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));