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>
Constructor
- Parameters
-
[in] | pinMode | if true set output mode else input mode. |
template<uint8_t PinNumber>
Constructor
- Parameters
-
[in] | mode | If true set output mode else input mode |
[in] | level | If mode is output, set level high/low. If mode is input, enable or disable the pin's 20K pull-up. |
template<uint8_t PinNumber>
void DigitalPin< PinNumber >::config |
( |
bool |
mode, |
|
|
bool |
level |
|
) |
| |
|
inline |
set pin configuration
- Parameters
-
[in] | mode | If true set output mode else input mode |
[in] | level | If mode is output, set level high/low. If mode is input, enable or disable the pin's 20K pull-up. |
template<uint8_t PinNumber>
Set pin level high if output mode or enable 20K pull-up if input mode.
template<uint8_t PinNumber>
Set pin level low if output mode or disable 20K pull-up if input mode.
template<uint8_t PinNumber>
void DigitalPin< PinNumber >::mode |
( |
bool |
pinMode | ) |
|
|
inline |
Set pin mode
- Parameters
-
[in] | pinMode | if true set output mode else input mode. |
mode() does not enable or disable the 20K pull-up for input mode.
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 pull-up.
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: