-
-
Notifications
You must be signed in to change notification settings - Fork 40k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Core] Allow customizing PWM frequency #21717
Conversation
Some frequencies can cause audible noise. Changing the frequency eliminates that. Signed-off-by: Daniel Schaefer <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Nice addition! To round this out, I suggest to update the QMK documentation so that people are aware of this new option. How to do that:
|
Signed-off-by: Daniel Schaefer <[email protected]>
@@ -73,6 +73,7 @@ To configure the backlighting, `#define` these in your `config.h`: | |||
|`BACKLIGHT_LIMIT_VAL` |`255` |The maximum duty cycle of the backlight -- `255` allows for full brightness, any lower will decrease the maximum.| | |||
|`BACKLIGHT_DEFAULT_LEVEL` |`BACKLIGHT_LEVELS`|The default backlight level to use upon clearing the EEPROM | | |||
|`BACKLIGHT_DEFAULT_BREATHING`|*Not defined* |Whether to enable backlight breathing upon clearing the EEPROM | | |||
|`BACKLIGHT_PWM_PERIOD` |2048Hz |Defaults to `BACKLIGHT_PWM_COUNTER_FREQUENCY / 2048`, which results in a PWM frequency of 2048Hz. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default here is incorrect for the majority of ChibiOS supported boards, and only correct for RP2040.
* [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]>
* [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]>
* [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]>
Description
Some frequencies can cause audible noise. Changing the frequency eliminates that.
Types of Changes
Checklist
Tested on Framework 16 keyboard (not upstreamed yet).