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 (bool 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 35 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 43 of file PinIO.cpp.

void PinIO::config ( bool  mode,
bool  data 
)

Configure the pin

Parameters:
[in]modeConfigure as output mode if true else input mode.
[in]dataFor output mode set pin high if true else low. For input mode enable 20K pullup if true else Hi-Z.

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

Definition at line 62 of file PinIO.cpp.

 All Classes Files Functions Variables Defines