Permalink
Browse files

Actually do the pullup or pulldown for STM32 F4

  • Loading branch information...
zathras777 committed May 11, 2016
1 parent 84598d4 commit 0a7c4e9a97d0b8d628698dbf5abc1b7ef685608a
Showing with 2 additions and 0 deletions.
  1. +2 −0 sw/airborne/arch/stm32/mcu_periph/gpio_arch.c
@@ -141,12 +141,14 @@ void gpio_setup_input(uint32_t port, uint16_t gpios)
void gpio_setup_input_pullup(uint32_t port, uint16_t gpios)
{
gpio_enable_clock(port);
gpio_set(port, gpios);
gpio_mode_setup(port, GPIO_MODE_INPUT, GPIO_PUPD_PULLUP, gpios);
}
void gpio_setup_input_pulldown(uint32_t port, uint16_t gpios)
{
gpio_enable_clock(port);
gpio_clear(port, gpios);
gpio_mode_setup(port, GPIO_MODE_INPUT, GPIO_PUPD_PULLDOWN, gpios);
}

0 comments on commit 0a7c4e9

Please sign in to comment.