Skip to content

Commit

Permalink
STM32L4: Invoke HAL_PWREx_EnablePullUpPullDownConfig...
Browse files Browse the repository at this point in the history
...if sleep pull is enabled for at least one pin.

CL: STM32L4: Invoke HAL_PWREx_EnablePullUpPullDownConfig if sleep pull is enabled for at least one pin
  • Loading branch information
rojer committed Oct 23, 2019
1 parent e706b20 commit 45ee850
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions platforms/stm32/src/stm32_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,9 @@ bool stm32_gpio_set_sleep_pull(int pin, enum mgos_gpio_pull_type pull) {
} else {
CLEAR_BIT(*pd_reg, pin_mask);
}
if (pull != MGOS_GPIO_PULL_NONE) {
HAL_PWREx_EnablePullUpPullDownConfig();
}
return true;
}
#endif
Expand Down

0 comments on commit 45ee850

Please sign in to comment.