Browse Source

Fix backlight for F401/F411 blackpill onekey examples (#10320)

Fix configs to make the `handwired/onekey/blackpill_f401:backlight` and
`handwired/onekey/blackpill_f411:backlight` examples actually compile
and work:

 - Use `PWMD5` instead of `PWMD2` for backlight, which matches the
   default value of `BACKLIGHT_PAL_MODE` (AF02 for pin A0 is `TIM5_CH1`)
   and does not conflict with the default value of `STM32_ST_USE_TIMER`.

 - Enable `HAL_USE_PWM` in halconf.h and `STM32_PWM_USE_TIM5` in
   mcuconf.h, so that `PWMD5` could be used.
pull/10397/head
Sergey Vlasov 3 years ago
committed by GitHub
parent
commit
7ddae97c89
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 10 additions and 2 deletions
  1. +1
    -1
      keyboards/handwired/onekey/blackpill_f401/config.h
  2. +1
    -0
      keyboards/handwired/onekey/blackpill_f401/halconf.h
  3. +3
    -0
      keyboards/handwired/onekey/blackpill_f401/mcuconf.h
  4. +1
    -1
      keyboards/handwired/onekey/blackpill_f411/config.h
  5. +1
    -0
      keyboards/handwired/onekey/blackpill_f411/halconf.h
  6. +3
    -0
      keyboards/handwired/onekey/blackpill_f411/mcuconf.h

+ 1
- 1
keyboards/handwired/onekey/blackpill_f401/config.h View File

@ -23,7 +23,7 @@
#define UNUSED_PINS
#define BACKLIGHT_PIN A0
#define BACKLIGHT_PWM_DRIVER PWMD2
#define BACKLIGHT_PWM_DRIVER PWMD5
#define BACKLIGHT_PWM_CHANNEL 1
#define RGB_DI_PIN A1


+ 1
- 0
keyboards/handwired/onekey/blackpill_f401/halconf.h View File

@ -16,5 +16,6 @@
#pragma once
#define HAL_USE_I2C TRUE
#define HAL_USE_PWM TRUE
#include_next "halconf.h"

+ 3
- 0
keyboards/handwired/onekey/blackpill_f401/mcuconf.h View File

@ -19,3 +19,6 @@
#undef STM32_I2C_USE_I2C1
#define STM32_I2C_USE_I2C1 TRUE
#undef STM32_PWM_USE_TIM5
#define STM32_PWM_USE_TIM5 TRUE

+ 1
- 1
keyboards/handwired/onekey/blackpill_f411/config.h View File

@ -23,7 +23,7 @@
#define UNUSED_PINS
#define BACKLIGHT_PIN A0
#define BACKLIGHT_PWM_DRIVER PWMD2
#define BACKLIGHT_PWM_DRIVER PWMD5
#define BACKLIGHT_PWM_CHANNEL 1
#define RGB_DI_PIN A1


+ 1
- 0
keyboards/handwired/onekey/blackpill_f411/halconf.h View File

@ -16,5 +16,6 @@
#pragma once
#define HAL_USE_I2C TRUE
#define HAL_USE_PWM TRUE
#include_next "halconf.h"

+ 3
- 0
keyboards/handwired/onekey/blackpill_f411/mcuconf.h View File

@ -19,3 +19,6 @@
#undef STM32_I2C_USE_I2C1
#define STM32_I2C_USE_I2C1 TRUE
#undef STM32_PWM_USE_TIM5
#define STM32_PWM_USE_TIM5 TRUE

Loading…
Cancel
Save