AStar32U4 library
|
#include <FastGPIO.h>
Public Attributes | |
uint8_t | state |
The state of the pin as returned from FastGPIO::Pin::getState. | |
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 484 of file FastGPIO.h.