Digital IO
 All Classes Files Functions Variables Macros Groups Pages
Public Member Functions | List of all members
PinIO Class Reference

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

#include <PinIO.h>

Public Member Functions

 PinIO ()
 
 PinIO (uint8_t pin)
 
bool begin (uint8_t pin)
 
void config (bool mode, bool data)
 
void high ()
 
void highI ()
 
void low ()
 
void lowI ()
 
void mode (bool pinMode)
 
void modeI (bool mode)
 
bool read ()
 
void toggle ()
 
void write (bool level)
 
void writeI (bool level)
 

Detailed Description

AVR port I/O with runtime pin numbers.

Definition at line 38 of file PinIO.h.

Constructor & Destructor Documentation

PinIO::PinIO ( )
inline

Create a PinIO object with no assigned pin.

Definition at line 41 of file PinIO.h.

Member Function Documentation

void PinIO::high ( )
inline

Set pin level high if output mode or enable 20K pullup if input mode.

This function will enable interrupts. This function should not be called in an ISR or where interrupts are disabled.

Definition at line 108 of file PinIO.h.

void PinIO::highI ( )
inline

Set pin high if output mode or enable 20K pullup if input mode.

This function must be called with interrupts disabled. This function will not change the interrupt state.

Definition at line 65 of file PinIO.h.

void PinIO::low ( )
inline

Set pin level low if output mode or disable 20K pullup if input mode.

This function will enable interrupts. This function should not be called in an ISR or where interrupts are disabled.

Definition at line 116 of file PinIO.h.

void PinIO::lowI ( )
inline

Set pin low if output mode or disable 20K pullup if input mode.

This function must be called with interrupts disabled. This function will not change the interrupt state.

Definition at line 73 of file PinIO.h.

void PinIO::mode ( bool  pinMode)
inline

Set pin mode

Parameters
[in]pinModeif true set output mode else input mode.

mode() does not enable or disable the 20K pullup for input mode.

This function will enable interrupts. This function should not be called in an ISR or where interrupts are disabled.

Definition at line 127 of file PinIO.h.

void PinIO::modeI ( bool  mode)
inline

Set pin mode

Parameters
[in]modeif true set output mode else input mode.

mode() does not enable or disable the 20K pullup for input mode.

This function must be called with interrupts disabled. This function will not change the interrupt state.

Definition at line 84 of file PinIO.h.

bool PinIO::read ( )
inline
Returns
Pin's level

Definition at line 48 of file PinIO.h.

void PinIO::toggle ( )
inline

toggle a pin

If the pin is in output mode toggle the pin's level. If the pin is in input mode toggle the state of the 20K pullup.

Definition at line 56 of file PinIO.h.

void PinIO::write ( bool  level)
inline

Write pin.

Parameters
[in]levelIf output mode set pin high if true else low. If input mode enable 20K pullup if true else disable pullup.

This function will enable interrupts. This function should not be called in an ISR or where interrupts are disabled.

Definition at line 137 of file PinIO.h.

void PinIO::writeI ( bool  level)
inline

Write pin.

Parameters
[in]levelIf output mode set pin high if true else low. If input mode enable 20K pullup if true else disable pullup.

This function must be called with interrupts disabled. This function will not change the interrupt state.

Definition at line 97 of file PinIO.h.


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