ISR()

Abstract

The ISR() is a macro to define a function to register with an interrupt vector.

Source code

The ISR() is defined in hardware/tools/avr/avr/include/avr/interrupt.h as below.

1
2
3
4
#  define __INTR_ATTRS used, externally_visible
#  define ISR(vector, ...)            \
    extern "C" void vector (void) __attribute__ ((signal,__INTR_ATTRS)) __VA_ARGS__; \
    void vector (void)

The ‘signal’ in the _attribute_ means that it is an interupt handler. The ‘used’ tells the compiler to write code to a file unless it looks unused. The ’externally_visible’ invalidates the effect of the ‘-fwhole_program’, which is a gcc compiler option.

Version

7.3.0-atmel3.6.1-arduino7

Last Update

May 15, 2021

inserted by FC2 system