Public Types | Public Member Functions | Private Attributes | List of all members
GPIO Class Reference

#include <gpio.h>

Inheritance diagram for GPIO:
Inheritance graph
[legend]

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_TypeDefport_
 

Detailed Description

Definition at line 37 of file gpio.h.

Member Enumeration Documentation

Enumerator
INPUT 
OUTPUT 
PERIPH_OUT 
PERIPH_IN 
PERIPH_IN_OUT 
ANALOG 
EXTERNAL_INTERRUPT 

Definition at line 47 of file gpio.h.

Enumerator
HIGH 
LOW 

Definition at line 41 of file gpio.h.

Member Function Documentation

void GPIO::init ( GPIO_TypeDef BasePort,
uint16_t  pin,
gpio_mode_t  mode 
)

Definition at line 34 of file gpio.cpp.

bool GPIO::read ( )

Definition at line 63 of file gpio.cpp.

void GPIO::set_mode ( gpio_mode_t  mode)

Definition at line 82 of file gpio.cpp.

void GPIO::toggle ( void  )

Definition at line 52 of file gpio.cpp.

void GPIO::write ( gpio_write_t  state)

Definition at line 41 of file gpio.cpp.

Member Data Documentation

gpio_mode_t GPIO::mode_
private

Definition at line 67 of file gpio.h.

uint16_t GPIO::pin_
private

Definition at line 65 of file gpio.h.

GPIO_TypeDef* GPIO::port_
private

Definition at line 66 of file gpio.h.


The documentation for this class was generated from the following files:


rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Thu Oct 24 2019 03:17:24