avr-classes
Public Member Functions | List of all members
GpioPin Class Referenceabstract

#include <gpiopin.h>

Inheritance diagram for GpioPin:
InputPin OutputPin GpioPortPin

Public Member Functions

virtual void setDirection (Direction dir)=0
 
virtual void setPullup (bool state)=0
 
- Public Member Functions inherited from InputPin
virtual bool getValue (void) const =0
 
- Public Member Functions inherited from OutputPin
virtual void setValue (bool value)=0
 

Detailed Description

GPIO pin that can be used as input or output. The interface supports control of an internal pullup resistor, e.g. when being used together with a device implementing the GpioPort interface.

Member Function Documentation

◆ setDirection()

virtual void GpioPin::setDirection ( Direction  dir)
pure virtual

Configure direction (input/output) of pin.

Parameters
dirDirection to set.

Implemented in GpioPortPin.

◆ setPullup()

virtual void GpioPin::setPullup ( bool  state)
pure virtual

Configure use of internal pullup resistors (if available) for pin.

Parameters
stateState of pullup resistors: true means active, false means inactive.

Implemented in GpioPortPin.