FastArduino v1.10
C++ library to build fast but small Arduino/AVR projects
|
Useful defines GCC specific attributes. More...
Go to the source code of this file.
Macros | |
#define | NOP() __asm__ __volatile__("nop") |
Utility to produce a nop instruction in generated code, as a way to debug (and optimize) generated assembly code from C++ source. More... | |
#define | UNUSED __attribute__((unused)) |
Specific GCC attribute to declare an argument or variable unused, so that the compiler does not emit any warning. More... | |
#define | INLINE __attribute__((always_inline)) |
Specific GCC attribute to force the compiler to always inline code of a given function. More... | |
#define | SIGNAL_HANDLER __attribute__ ((signal)) |
Specific GCC attribute for AVR target, declaring a function as a signal handler (aka ISR, or Interrupt Service Routine). More... | |
#define | NAKED_SIGNAL __attribute__((signal, naked, __INTR_ATTRS)) |
Specific GCC attribute for AVR target, declaring a signal handler (aka ISR, or Interrupt Service Routine) as an empty function. More... | |
#define | WEAK __attribute__((weak)) |
Specific GCC attribute to declare a function as weakly linked, which makes it a default implementation that can be overwritten by simply redefining it without that attribute. More... | |
Useful defines GCC specific attributes.
Definition in file defines.h.
#define NOP | ( | ) | __asm__ __volatile__("nop") |
#define UNUSED __attribute__((unused)) |
Specific GCC attribute to declare an argument or variable unused, so that the compiler does not emit any warning.
#define INLINE __attribute__((always_inline)) |
#define SIGNAL_HANDLER __attribute__ ((signal)) |
Specific GCC attribute for AVR target, declaring a function as a signal handler (aka ISR, or Interrupt Service Routine).
You will never need to use it in your programs as all ISR for a target are declared by FastArduino in header files in fastarduino/board
directory and get automatically included as soon as you use FastArduino in your project.
#define NAKED_SIGNAL __attribute__((signal, naked, __INTR_ATTRS)) |
Specific GCC attribute for AVR target, declaring a signal handler (aka ISR, or Interrupt Service Routine) as an empty function.
This is used when enabling an interrupt only to awaken the MCU but with no further processing of the interrupt; this ensures more compact code generation.
You will normally never need to use it in your programs as FastArduino provides regsitration macros for empty ISR. You just have to call the proper macro(s) once in your program.
#define WEAK __attribute__((weak)) |
Specific GCC attribute to declare a function as weakly linked, which makes it a default implementation that can be overwritten by simply redefining it without that attribute.