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