Zumo32U4 library
|
#include <FastGPIO.h>
Public Attributes | |
uint8_t | state |
The state of the pin as returned from FastGPIO::Pin::getState. More... | |
This class saves the state of the specified pin in its constructor when it is created, and restores the pin to that state in its destructor. This can be very useful if a pin is being used for multiple purposes. It allows you to write code that temporarily changes the state of the pin and is guaranteed to restore the state later.
For example, if you were controlling both a button and an LED using a single pin and you wanted to see if the button was pressed without affecting the LED, you could write:
This is equivalent to:
Definition at line 542 of file FastGPIO.h.
|
inline |
Definition at line 548 of file FastGPIO.h.
|
inline |
Definition at line 553 of file FastGPIO.h.
uint8_t FastGPIO::PinLoan< pin >::state |
The state of the pin as returned from FastGPIO::Pin::getState.
Definition at line 546 of file FastGPIO.h.