forked from mirrors/qmk_userspace
Add and use PWM frequency defines for ISSI LED drivers (#22009)
This commit is contained in:
parent
f9ed1e3ebc
commit
76daf29ef0
18 changed files with 58 additions and 12 deletions
|
@ -49,6 +49,7 @@
|
|||
#define IS31FL3741_REG_CONFIGURATION 0x00 // PG4
|
||||
#define IS31FL3741_REG_GLOBALCURRENT 0x01 // PG4
|
||||
#define IS31FL3741_REG_PULLDOWNUP 0x02 // PG4
|
||||
#define IS31FL3741_REG_PWM_FREQUENCY 0x36 // PG4
|
||||
#define IS31FL3741_REG_RESET 0x3F // PG4
|
||||
|
||||
#ifndef IS31FL3741_I2C_TIMEOUT
|
||||
|
@ -63,6 +64,10 @@
|
|||
# define IS31FL3741_CONFIGURATION 0x01
|
||||
#endif
|
||||
|
||||
#ifndef IS31FL3741_PWM_FREQUENCY
|
||||
# define IS31FL3741_PWM_FREQUENCY IS31FL3741_PWM_FREQUENCY_29K_HZ
|
||||
#endif
|
||||
|
||||
#ifndef IS31FL3741_SWPULLUP
|
||||
# define IS31FL3741_SWPULLUP IS31FL3741_PUR_32KR
|
||||
#endif
|
||||
|
@ -170,6 +175,8 @@ void is31fl3741_init(uint8_t addr) {
|
|||
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));
|
||||
// Set PWM frequency
|
||||
is31fl3741_write_register(addr, IS31FL3741_REG_PWM_FREQUENCY, (IS31FL3741_PWM_FREQUENCY & 0b1111));
|
||||
|
||||
// is31fl3741_update_led_scaling_registers(addr, 0xFF, 0xFF, 0xFF);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue