Digital IO
|
Classes | |
class | DigitalPin< PinNumber > |
Fast AVR digital port I/O. More... | |
class | pin_map_t |
struct for mapping digital pins More... | |
Functions | |
static void | badPinCheck (uint8_t pin) |
void | badPinNumber (void) |
static void | fastBitWriteSafe (volatile uint8_t *address, uint8_t bit, bool level) |
static bool | fastDigitalRead (uint8_t pin) |
static void | fastDigitalToggle (uint8_t pin) |
static void | fastDigitalWrite (uint8_t pin, bool level) |
static void | fastPinConfig (uint8_t pin, bool mode, bool level) |
static void | fastPinMode (uint8_t pin, bool mode) |
Variables | |
static const uint8_t | digitalPinCount = sizeof(pinMap)/sizeof(pin_map_t) |
Fast Digital I/O functions and template class.
static void badPinCheck | ( | uint8_t | pin | ) | [inline, static] |
Check for valid pin number
[in] | pin | Number of pin to be checked. |
Definition at line 403 of file DigitalPin.h.
void badPinNumber | ( | void | ) |
generate bad pin number error
static void fastBitWriteSafe | ( | volatile uint8_t * | address, |
uint8_t | bit, | ||
bool | level | ||
) | [inline, static] |
fast write helper
[in] | address | I/O register address |
[in] | bit | bit number to write |
[in] | level | value for bit |
Definition at line 415 of file DigitalPin.h.
static bool fastDigitalRead | ( | uint8_t | pin | ) | [inline, static] |
read pin value
[in] | pin | Arduino pin number |
Definition at line 436 of file DigitalPin.h.
static void fastDigitalToggle | ( | uint8_t | pin | ) | [inline, static] |
toggle a pin
[in] | pin | Arduino pin number |
If the pin is in output mode toggle the pin level. If the pin is in input mode toggle the state of the 20K pullup.
Definition at line 448 of file DigitalPin.h.
static void fastDigitalWrite | ( | uint8_t | pin, |
bool | level | ||
) | [inline, static] |
Set pin value
[in] | pin | Arduino pin number |
[in] | level | value to write |
Definition at line 464 of file DigitalPin.h.
static void fastPinConfig | ( | uint8_t | pin, |
bool | mode, | ||
bool | level | ||
) | [inline, static] |
set pin configuration
[in] | pin | Arduino pin number |
[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 pullup. |
Definition at line 488 of file DigitalPin.h.
static void fastPinMode | ( | uint8_t | pin, |
bool | mode | ||
) | [inline, static] |
set pin mode
[in] | pin | Arduino pin number |
[in] | mode | if true set output mode else input mode |
fastPinMode does not enable or disable the 20K pullup for input mode.
Definition at line 476 of file DigitalPin.h.
const uint8_t digitalPinCount = sizeof(pinMap)/sizeof(pin_map_t) [static] |
count of pins
Definition at line 393 of file DigitalPin.h.