创客百科

姿势共享,有节操无门槛参与的创客百科,创客动力之源 \ (^_^) /

用户工具

站点工具


arduino:avrgcc:signal

SIGNAL()

Abstract

The SIGNAL() is a macro to define a function to register to interrupt vectors.

ソースコード

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

#  define __INTR_ATTRS used, externally_visible

#  define SIGNAL(vector)                                        \
    extern "C" void vector(void) __attribute__ ((signal, __INTR_ATTRS));        \
    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.

本页面的其他翻译:
arduino/avrgcc/signal.txt · 最后更改: 2016/12/25 22:15 (外部编辑)