fl16: Change backlight PWM frequency to 24kHz

The default of 2048Hz causes loud audible noise.

Signed-off-by: Daniel Schaefer <dhs@frame.work>
This commit is contained in:
Daniel Schaefer 2023-07-13 20:23:38 +08:00
parent c88903142d
commit d4005cf3c7
2 changed files with 4 additions and 0 deletions

View File

@ -35,6 +35,8 @@
#define BACKLIGHT_PWM_DRIVER PWMD4
#define BACKLIGHT_PWM_CHANNEL RP2040_PWM_CHANNEL_B
#define BACKLIGHT_BREATHING
// Change PWM frequency to 24kHz, the default of 2048Hz causes loud noise
#define BACKLIGHT_PWM_PERIOD BACKLIGHT_PWM_COUNTER_FREQUENCY / 24000
// I2C for the RBG controller
#define I2C_DRIVER I2CD1

View File

@ -35,7 +35,9 @@
# define BACKLIGHT_PAL_MODE (PAL_MODE_ALTERNATE_PWM | PAL_RP_PAD_DRIVE12 | PAL_RP_GPIO_OE)
# define BACKLIGHT_PWM_COUNTER_FREQUENCY 1000000
#ifndef BACKLIGHT_PWM_PERIOD
# define BACKLIGHT_PWM_PERIOD BACKLIGHT_PWM_COUNTER_FREQUENCY / 2048
#endif
# define AUDIO_PWM_PAL_MODE (PAL_MODE_ALTERNATE_PWM | PAL_RP_PAD_DRIVE12 | PAL_RP_GPIO_OE)
# define AUDIO_PWM_COUNTER_FREQUENCY 500000