atMETEO
An ATmega based weather station
Files | Macros

Utilities for interrupt service routines. More...

Collaboration diagram for Interrupt handling:

Files

file  interrupt.h
 Utilities for interrupt service routines.
 

Macros

#define CLASS_IRQ(name, vector)
 Creates an interrupt service routine as static member function of a class. More...
 

Detailed Description

Utilities for interrupt service routines.

See also
http://www.nongnu.org/avr-libc/user-manual/group__avr__interrupts.html

Macro Definition Documentation

◆ CLASS_IRQ

#define CLASS_IRQ (   name,
  vector 
)

Creates an interrupt service routine as static member function of a class.

Interrupt service routines are typically introduced as free functions by using the ISR macro. When programming in C++, it might be desirable to create the interrupt service routine as part of a class.

Usage:

class Timer0Interrupt {
CLASS_IRQ(serviceRoutine, TIMER0_COMPA_vect);
};
Parameters
nameName of the new static member function.
vectorMCU specific interrupt vector name.
See also
http://www.nongnu.org/avr-libc/user-manual/group__avr__interrupts.html
http://lists.gnu.org/archive/html/avr-chat/2008-02/msg00001.html