Fast digital port I/O.
More...
#include <DigitalPin.h>
template<uint8_t PinNumber>
class DigitalPin< PinNumber >
Fast digital port I/O.
template<uint8_t PinNumber>
template<uint8_t PinNumber>
void DigitalPin< PinNumber >::config |
( |
uint8_t |
mode, |
|
|
bool |
level |
|
) |
| |
|
inline |
Set pin configuration.
- Parameters
-
[in] | mode | INPUT or OUTPUT. |
[in] | level | If mode is OUTPUT, set level high/low. If mode is INPUT, enable or disable the pin's 20K pullup. |
template<uint8_t PinNumber>
Set pin level high if output mode or enable 20K pullup if input mode.
template<uint8_t PinNumber>
Set pin level low if output mode or disable 20K pullup if input mode.
template<uint8_t PinNumber>
void DigitalPin< PinNumber >::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.
template<uint8_t PinNumber>
Parenthesis operator.
- Returns
- Pin's level
template<uint8_t PinNumber>
Asignment operator.
- Parameters
-
[in] | value | If true set the pin's level high else set the pin's level low. |
- Returns
- This DigitalPin instance.
template<uint8_t PinNumber>
template<uint8_t PinNumber>
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.
template<uint8_t PinNumber>
Write the pin's level.
- Parameters
-
[in] | value | If true set the pin's level high else set the pin's level low. |
The documentation for this class was generated from the following file: