Paparazzi UAS
v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
|
GPIO helper functions for STM32F1 and STM32F4. More...
#include <libopencm3/stm32/gpio.h>
Go to the source code of this file.
Functions | |
void | gpio_setup_output (uint32_t port, uint16_t gpios) |
Setup one or more pins of the given GPIO port as outputs. More... | |
void | gpio_setup_input (uint32_t port, uint16_t gpios) |
Setup one or more pins of the given GPIO port as inputs. More... | |
void | gpio_setup_input_pullup (uint32_t port, uint16_t gpios) |
Setup one or more pins of the given GPIO port as inputs with pull up resistor enabled. More... | |
void | gpio_setup_input_pulldown (uint32_t port, uint16_t gpios) |
Setup one or more pins of the given GPIO port as inputs with pull down resistors enabled. More... | |
void | gpio_setup_pin_af (uint32_t port, uint16_t pin, uint8_t af, bool is_output) |
Setup a gpio for input or output with alternate function. More... | |
void | gpio_setup_pin_analog (uint32_t port, uint16_t pin) |
Setup a gpio for analog use. More... | |
void | gpio_enable_clock (uint32_t port) |
Enable the relevant clock. More... | |
GPIO helper functions for STM32F1 and STM32F4.
The gpio_set and gpio_clear functions are already available from libopencm3.
Definition in file gpio_arch.h.
void gpio_enable_clock | ( | uint32_t | port | ) |
Enable the relevant clock.
This is an STM32 specific helper funtion and should only be used in stm32 arch code.
Definition at line 34 of file gpio_arch.c.
References GPIOA, GPIOB, GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, and GPIOH.
Referenced by SpektrumUartInit().
Setup one or more pins of the given GPIO port as inputs.
[in] | port | |
[in] | gpios | If multiple pins are to be changed, use logical OR '|' to separate them. |
Definition at line 86 of file gpio_ardrone.c.
References GPIO_DIRECTION, GPIO_INPUT, gpiofp, gpio_direction::mode, and gpio_direction::pin.
Setup one or more pins of the given GPIO port as inputs with pull down resistors enabled.
[in] | port | |
[in] | gpios | If multiple pins are to be changed, use logical OR '|' to separate them. |
Setup one or more pins of the given GPIO port as inputs with pull up resistor enabled.
[in] | port | |
[in] | gpios | If multiple pins are to be changed, use logical OR '|' to separate them. |
Setup one or more pins of the given GPIO port as outputs.
[in] | port | |
[in] | gpios | If multiple pins are to be changed, use logical OR '|' to separate them. |
Definition at line 102 of file gpio_ardrone.c.
Setup a gpio for input or output with alternate function.
This is an STM32 specific helper funtion and should only be used in stm32 arch code.