AVRTools
A Library for the AVR ATmega328 and ATmega2560 Microcontrollers
Public Member Functions | List of all members
Interrupts::ExternalOff Class Reference

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

§ ExternalOff()

Interrupts::ExternalOff::ExternalOff ( uint8_t  whichOnesToTurnOff = kExternalInterruptMask)
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.

The documentation for this class was generated from the following file: