MAV'RIC
|
Classes | |
struct | conf_t |
GPIO configuration. More... | |
Public Member Functions | |
Gpio_chibios (conf_t config) | |
Constructor. | |
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. |
bool Gpio_chibios::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_chibios::init | ( | void | ) | [virtual] |
Hardware initialization.
Implements Gpio.
bool Gpio_chibios::read | ( | void | ) | [virtual] |
bool Gpio_chibios::set_high | ( | void | ) | [virtual] |
Write 1 to the gpio.
Implements Gpio.
bool Gpio_chibios::set_low | ( | void | ) | [virtual] |
Write 0 to the gpio.
Implements Gpio.
bool Gpio_chibios::toggle | ( | void | ) | [virtual] |
Toggle the gpio value.
Writes 0 if currently high, writes 1 if currently low
Implements Gpio.
bool Gpio_chibios::write | ( | bool | level | ) | [virtual] |
Write to the gpio pin.
level | Value to write |
Implements Gpio.