Open FFBoard
Open source force feedback firmware
GpioPin Class Reference

#include <GPIOPin.h>

Inheritance diagram for GpioPin:
InputPin OutputPin

Public Member Functions

 GpioPin (GPIO_TypeDef &port, uint16_t pin)
 
bool operator== (const GpioPin &b)
 
const GPIO_TypeDef * getPort () const
 
uint16_t getPin () const
 

Protected Attributes

GPIO_TypeDef * port
 
uint16_t pin
 

Detailed Description

For now this class only works with pre-configured output pins but it could be easily extended to cover input pins as well as expose various configuration API's.

Definition at line 14 of file GPIOPin.h.

Constructor & Destructor Documentation

◆ GpioPin()

GpioPin::GpioPin ( GPIO_TypeDef &  port,
uint16_t  pin 
)
inline

Definition at line 19 of file GPIOPin.h.

Member Function Documentation

◆ getPin()

uint16_t GpioPin::getPin ( ) const
inline

Definition at line 27 of file GPIOPin.h.

◆ getPort()

const GPIO_TypeDef * GpioPin::getPort ( ) const
inline

Definition at line 26 of file GPIOPin.h.

◆ operator==()

bool GpioPin::operator== ( const GpioPin b)
inline

Definition at line 23 of file GPIOPin.h.

Member Data Documentation

◆ pin

uint16_t GpioPin::pin
protected

Definition at line 17 of file GPIOPin.h.

◆ port

GPIO_TypeDef* GpioPin::port
protected

Definition at line 16 of file GPIOPin.h.


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