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

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

§ PinChangeOff()

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

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