Class for simultaneous operations on Arduino I/O pins.
More...
#include <PinGroup.h>
Class for simultaneous operations on Arduino I/O pins.
- Author
- Alec Fenichel
- Examples:
- Pin-Group.ino.
Definition at line 18 of file PinGroup.h.
template<size_t N>
PinGroup::PinGroup |
( |
Pin(&) |
pins[N] | ) |
|
|
inline |
Default constructor.
- Parameters
-
Definition at line 26 of file PinGroup.h.
volatile uint8_t* PinGroup::getDDR |
( |
| ) |
|
|
inline |
Get a pointer to the DDR register.
- Returns
- pointer to the DDR register
Definition at line 148 of file PinGroup.h.
uint8_t PinGroup::getInverseOffset |
( |
| ) |
|
|
inline |
Get the inverse pin offset.
- Returns
- inverse pin offset
Definition at line 121 of file PinGroup.h.
uint8_t PinGroup::getMode |
( |
| ) |
|
|
inline |
Get the mode of the pin from the DDR register.
- Returns
- mode of the pin (OUTPUT, INPUT, -1)
Definition at line 157 of file PinGroup.h.
uint8_t* PinGroup::getNumbers |
( |
| ) |
|
|
inline |
Get the pin numbers.
- Returns
- array of pin numbers
Definition at line 103 of file PinGroup.h.
uint8_t PinGroup::getOffset |
( |
| ) |
|
|
inline |
Get the pin offset.
- Returns
- pin offset
Definition at line 112 of file PinGroup.h.
volatile uint8_t* PinGroup::getPIN |
( |
| ) |
|
|
inline |
Get a pointer to the PIN register.
- Returns
- pointer to the PIN register
Definition at line 130 of file PinGroup.h.
volatile uint8_t* PinGroup::getPORT |
( |
| ) |
|
|
inline |
Get a pointer to the PORT register.
- Returns
- pointer to the PORT register
Definition at line 139 of file PinGroup.h.
uint8_t PinGroup::getState |
( |
| ) |
|
|
inline |
Get the state of the pin from the PORT register.
- Returns
- state of the pin (HIGH, LOW, -1)
Definition at line 173 of file PinGroup.h.
uint8_t PinGroup::getValue |
( |
| ) |
|
|
inline |
Get the value of the pin from the PIN register.
- Returns
- value of the pin (HIGH, LOW, -1)
Definition at line 189 of file PinGroup.h.
bool PinGroup::isValid |
( |
| ) |
|
|
inline |
Check the group to ensure all pins use the same registers.
- Returns
- true if the pins in the group all use the same registers, false otherwise
- Examples:
- Pin-Group.ino.
Definition at line 205 of file PinGroup.h.
bool PinGroup::operator!= |
( |
uint8_t |
value | ) |
|
|
inline |
Compare the value of the pin.
- Parameters
-
value | the state of the pin (HIGH, LOW) |
- Returns
- true if the value of all of the pins are not equal to the value passed in, false otherwise
Definition at line 69 of file PinGroup.h.
PinGroup& PinGroup::operator= |
( |
uint8_t |
state | ) |
|
|
inline |
Set the pin state.
- Parameters
-
state | the state of the pin (HIGH, LOW) |
Definition at line 85 of file PinGroup.h.
bool PinGroup::operator== |
( |
uint8_t |
value | ) |
|
|
inline |
Compare the value of the pin.
- Parameters
-
value | the state of the pin (HIGH, LOW) |
- Returns
- true if the value of all of the pins are equal to the value passed in, false otherwise
Definition at line 51 of file PinGroup.h.
void PinGroup::set |
( |
uint8_t |
mode, |
|
|
uint8_t |
state |
|
) |
| |
|
inline |
Set the pin mode and pin state.
- Parameters
-
mode | the mode of the pin (OUTPUT, INPUT) |
state | the state of the pin (HIGH, LOW) |
Definition at line 215 of file PinGroup.h.
void PinGroup::setMode |
( |
uint8_t |
mode | ) |
|
|
inline |
Set the pin mode.
- Parameters
-
mode | the mode of the pin (OUTPUT, INPUT) |
Definition at line 236 of file PinGroup.h.
void PinGroup::setState |
( |
uint8_t |
state | ) |
|
|
inline |
Set the pin state.
- Parameters
-
state | the state of the pin (HIGH, LOW) |
Definition at line 252 of file PinGroup.h.
The documentation for this class was generated from the following file: