diff options
author | Daniel Schaefer <[email protected]> | 2023-09-03 20:56:02 +0800 |
---|---|---|
committer | GitHub <[email protected]> | 2023-09-03 14:56:02 +0200 |
commit | dd887eae360098cd13939d252c772bb95735e0e9 (patch) | |
tree | 6694375af1101e23cef212f52248a1f73331f3b8 /platforms | |
parent | 911c715f49f757eae6490d3d0426ee4ccf30ea2a (diff) | |
download | qmk_firmware-dd887eae360098cd13939d252c772bb95735e0e9.tar.gz qmk_firmware-dd887eae360098cd13939d252c772bb95735e0e9.zip |
[Core] Allow customizing PWM frequency (#21717)
* [Core] Allow customizing PWM frequency
Some frequencies can cause audible noise. Changing the frequency
eliminates that.
Signed-off-by: Daniel Schaefer <[email protected]>
* docs/feature-backlight: Mention PWM frequency
Signed-off-by: Daniel Schaefer <[email protected]>
---------
Signed-off-by: Daniel Schaefer <[email protected]>
Diffstat (limited to 'platforms')
-rw-r--r-- | platforms/chibios/chibios_config.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/platforms/chibios/chibios_config.h b/platforms/chibios/chibios_config.h index 1f8a7842fe..f1636f9da0 100644 --- a/platforms/chibios/chibios_config.h +++ b/platforms/chibios/chibios_config.h @@ -37,7 +37,9 @@ # define BACKLIGHT_PAL_MODE (PAL_MODE_ALTERNATE_PWM | PAL_RP_PAD_DRIVE12 | PAL_RP_GPIO_OE) # endif # define BACKLIGHT_PWM_COUNTER_FREQUENCY 1000000 -# define BACKLIGHT_PWM_PERIOD BACKLIGHT_PWM_COUNTER_FREQUENCY / 2048 +# ifndef BACKLIGHT_PWM_PERIOD +# define BACKLIGHT_PWM_PERIOD BACKLIGHT_PWM_COUNTER_FREQUENCY / 2048 +# endif # ifndef AUDIO_PWM_PAL_MODE # define AUDIO_PWM_PAL_MODE (PAL_MODE_ALTERNATE_PWM | PAL_RP_PAD_DRIVE12 | PAL_RP_GPIO_OE) |