diff options
author | Stefan Kerkmann <[email protected]> | 2022-10-04 23:10:24 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2022-10-04 23:10:24 +0200 |
commit | 996a9006d3f101dc5c48b58339e2e7323040fd59 (patch) | |
tree | 56bb76db42e23e3a1bc343ee7d35ee307e08a0a0 /platforms/chibios/chibios_config.h | |
parent | b6ea8837e4c81f364d30bdc74bf2cdccb2a1a185 (diff) | |
download | qmk_firmware-996a9006d3f101dc5c48b58339e2e7323040fd59.tar.gz qmk_firmware-996a9006d3f101dc5c48b58339e2e7323040fd59.zip |
[Core] PWM Backlight for RP2040 (#17706)
Diffstat (limited to 'platforms/chibios/chibios_config.h')
-rw-r--r-- | platforms/chibios/chibios_config.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/platforms/chibios/chibios_config.h b/platforms/chibios/chibios_config.h index 8dcc23727f..38d3a40f6b 100644 --- a/platforms/chibios/chibios_config.h +++ b/platforms/chibios/chibios_config.h @@ -28,6 +28,10 @@ # define USE_GPIOV1 # define PAL_OUTPUT_TYPE_OPENDRAIN _Static_assert(0, "RP2040 has no Open Drain GPIO configuration, setting this is not possible"); +# define BACKLIGHT_PAL_MODE (PAL_MODE_ALTERNATE_PWM | PAL_RP_PAD_DRIVE12 | PAL_RP_GPIO_OE) +# define BACKLIGHT_PWM_COUNTER_FREQUENCY 1000000 +# define BACKLIGHT_PWM_PERIOD BACKLIGHT_PWM_COUNTER_FREQUENCY / 2048 + # define usb_lld_endpoint_fields # define I2C1_SCL_PAL_MODE (PAL_MODE_ALTERNATE_I2C | PAL_RP_PAD_SLEWFAST | PAL_RP_PAD_PUE | PAL_RP_PAD_DRIVE4) |