drivers: pinctrl: wch_afio: fix afio remap
Enable the AFIO clock before remap. Signed-off-by: Jianxiong Gu <jianxiong.gu@outlook.com>
This commit is contained in:
parent
21584003bf
commit
948fbacd33
1 changed files with 4 additions and 0 deletions
|
@ -28,6 +28,10 @@ int pinctrl_configure_pins(const pinctrl_soc_pin_t *pins, uint8_t pin_cnt, uintp
|
|||
uint32_t pcfr1 = AFIO->PCFR1;
|
||||
uint8_t cfg = 0;
|
||||
|
||||
if (remap != 0) {
|
||||
RCC->APB2PCENR |= RCC_AFIOEN;
|
||||
}
|
||||
|
||||
if (pins->output_high || pins->output_low) {
|
||||
cfg |= (pins->slew_rate + 1);
|
||||
if (pins->drive_open_drain) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue