#include <gpio.h>
Public Types | |
enum | gpio_mode_t { INPUT, OUTPUT, PERIPH_OUT, PERIPH_IN, PERIPH_IN_OUT, ANALOG, EXTERNAL_INTERRUPT } |
enum | gpio_write_t { HIGH, LOW } |
Public Member Functions | |
void | init (GPIO_TypeDef *BasePort, uint16_t pin, gpio_mode_t mode) |
bool | read () |
void | set_mode (gpio_mode_t mode) |
void | toggle (void) |
void | write (gpio_write_t state) |
Private Attributes | |
gpio_mode_t | mode_ |
uint16_t | pin_ |
GPIO_TypeDef * | port_ |
enum GPIO::gpio_mode_t |
enum GPIO::gpio_write_t |
void GPIO::init | ( | GPIO_TypeDef * | BasePort, |
uint16_t | pin, | ||
gpio_mode_t | mode | ||
) |
void GPIO::set_mode | ( | gpio_mode_t | mode | ) |
void GPIO::write | ( | gpio_write_t | state | ) |
|
private |
|
private |