MAV'RIC
|
Public Member Functions | |
Gpio_stm32 (gpio_stm32_conf_t config=gpio_stm32_default_config()) | |
Initialises the peripheral. | |
bool | init (void) |
Hardware initialization. | |
bool | configure (gpio_dir_t dir, gpio_pull_updown_t pull) |
Configures the GPIO. | |
bool | set_high (void) |
Write 1 to the gpio. | |
bool | set_low (void) |
Write 0 to the gpio. | |
bool | toggle (void) |
Toggle the gpio value. | |
bool | write (bool level) |
Write to the gpio pin. | |
bool | read (void) |
Read the current gpio level. |
Gpio_stm32::Gpio_stm32 | ( | gpio_stm32_conf_t | config = gpio_stm32_default_config() | ) |
Initialises the peripheral.
config | Device configuration |
bool Gpio_stm32::configure | ( | gpio_dir_t | dir, |
gpio_pull_updown_t | pull | ||
) | [virtual] |
Configures the GPIO.
dir | Pin direction (one of enum gpio_dir_t) |
pull | Pin pull up/down (one of enum gpio_pull_updown_t) |
Implements Gpio.
bool Gpio_stm32::init | ( | void | ) | [virtual] |
Hardware initialization.
Implements Gpio.
bool Gpio_stm32::read | ( | void | ) | [virtual] |
bool Gpio_stm32::set_high | ( | void | ) | [virtual] |
Write 1 to the gpio.
Implements Gpio.
bool Gpio_stm32::set_low | ( | void | ) | [virtual] |
Write 0 to the gpio.
Implements Gpio.
bool Gpio_stm32::toggle | ( | void | ) | [virtual] |
Toggle the gpio value.
Writes 0 if currently high, writes 1 if currently low
Implements Gpio.
bool Gpio_stm32::write | ( | bool | level | ) | [virtual] |
Write to the gpio pin.
level | Value to write |
Implements Gpio.