AVR port I/O with runtime pin numbers.
More...
#include <PinIO.h>
AVR port I/O with runtime pin numbers.
Definition at line 39 of file PinIO.h.
Create a PinIO object with no assigned pin.
Definition at line 42 of file PinIO.h.
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 114 of file PinIO.h.
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 66 of file PinIO.h.
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 123 of file PinIO.h.
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 74 of file PinIO.h.
void PinIO::mode |
( |
uint8_t |
mode | ) |
|
|
inline |
Set pin mode.
- Parameters
-
[in] | mode | INPUT, OUTPUT, or INPUT_PULLUP. |
The internal pullup resistors will be enabled if mode is INPUT_PULLUP and disabled if the mode is INPUT.
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::modeI |
( |
uint8_t |
mode | ) |
|
|
inline |
Set pin mode.
- Parameters
-
[in] | mode | INPUT, OUTPUT, or INPUT_PULLUP. |
The internal pullup resistors will be enabled if mode is INPUT_PULLUP and disabled if the mode is INPUT.
This function must be called with interrupts disabled. This function will not change the interrupt state.
Definition at line 86 of file PinIO.h.
- Returns
- Pin's level
Definition at line 49 of file PinIO.h.
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 57 of file PinIO.h.
void PinIO::write |
( |
bool |
level | ) |
|
|
inline |
Write pin.
- Parameters
-
[in] | level | If 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 148 of file PinIO.h.
void PinIO::writeI |
( |
bool |
level | ) |
|
|
inline |
Write pin.
- Parameters
-
[in] | level | If 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 103 of file PinIO.h.
The documentation for this class was generated from the following files:
- Arduino/libraries/DigitalIO/src/PinIO.h
- Arduino/libraries/DigitalIO/src/PinIO.cpp