AVRTools
A Library for the AVR ATmega328 and ATmega2560 Microcontrollers
|
This class defines an object that disables selected pin change interrupts during its lifetime. The selected pin change interrupts are restored by the object's destructor when it goes out of scope. More...
#include <InterruptUtils.h>
Public Member Functions | |
PinChangeOff (uint8_t whichOnesToTurnOff=kPinChangeInterruptMask) | |
Suppress some or all of the pin change interrupts when the object is instantiated. More... | |
~PinChangeOff () | |
Re-enable the selected pin change interrupts. | |
This class defines an object that disables selected pin change interrupts during its lifetime. The selected pin change interrupts are restored by the object's destructor when it goes out of scope.
|
inline |
Suppress some or all of the pin change interrupts when the object is instantiated.
whichOnesToTurnOff
is a bit mask, indicating the pin change interrupts to disable. The mask bits correspond to the bits in the Pin Change Interrupt Control Register (PCICR). If the argument is omitted, all pin change interrupts will be disabled.