Digital IO
Classes | Functions
Runtime Pin I/O

Classes

class  PinIO
 AVR port I/O with runtime pin numbers. More...
 

Functions

 PinIO::PinIO (uint8_t pin)
 
bool PinIO::begin (uint8_t pin)
 
void PinIO::config (uint8_t mode, bool data)
 

Detailed Description

Two Wire Interface library.

Function Documentation

PinIO::PinIO ( uint8_t  pin)
explicit

Constructor

Parameters
[in]pinPin assigned to this object.

Definition at line 36 of file PinIO.cpp.

bool PinIO::begin ( uint8_t  pin)

Initialize pin bit mask and port address.

Parameters
[in]pinArduino board pin number.
Returns
true for success or false if invalid pin number.

Definition at line 44 of file PinIO.cpp.

void PinIO::config ( uint8_t  mode,
bool  level 
)

Configure the pin.

Parameters
[in]modeINPUT or OUTPUT.
[in]levelIf mode is OUTPUT, set level high/low. If mode is INPUT, enable or disable the pin's 20K pullup.

This function may be used with interrupts enabled or disabled. The previous interrupt state will be restored.

Definition at line 63 of file PinIO.cpp.