Compare commits

...

3 Commits

Author SHA1 Message Date
QMK Bot
b87877660e Merge remote-tracking branch 'origin/master' into develop 2023-09-03 15:57:50 +00:00
Joel Challis
e26442fc2a
redragon/k667: Remove 2 layer VIA restriction (#21889) 2023-09-03 16:57:10 +01:00
Daniel Schaefer
dd887eae36
[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 <dhs@frame.work>

* docs/feature-backlight: Mention PWM frequency

Signed-off-by: Daniel Schaefer <dhs@frame.work>

---------

Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-09-03 14:56:02 +02:00
3 changed files with 4 additions and 4 deletions

View File

@ -39,6 +39,7 @@ Add the following to 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. |
Unless you are designing your own keyboard, you generally should not need to change the `BACKLIGHT_PIN` or `BACKLIGHT_ON_STATE`.

View File

@ -6,9 +6,6 @@
"matrix": [1, 0]
},
"diode_direction": "COL2ROW",
"dynamic_keymap": {
"layer_count": 2
},
"encoder": {
"rotary": [
{"pin_a": "B5", "pin_b": "B4"}

View File

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