Defines the base types and type-related macros used throughout the rest of libmaple.
In the case of macros for GCC’s __attribute__s, we have our own macros mostly to save typing, but also in hopes that they might be expressible using different compiler extensions, or to give them different interpretations when running e.g. Doxygen on libmaple.
Macro for inline __attribute__((always_inline)). This can be used to defeat GCC’s -Os when you Really Mean Inline.
Macro for a GCC __attribute__ which (when using libmaple’s linker scripts) will cause the variable being marked to be stored in Flash, rather than SRAM. It’s useful for read-only variables like look-up tables.
Macro for __attribute__((deprecated)). Its use causes GCC to emit deprecation warnings when the deprecated functionality is used. It’s not used for everything that gets deprecated, so don’t rely on it to catch all uses of deprecated APIs.
Macro for __attribute__((packed)).
Macro for volatile which denotes that the variable whose type is being qualified is IO-mapped. Its most common use is in the individual members of each register map struct.
Macro for __attribute__((weak)).
Macro for __attribute__((unused)). This can be used (sparingly!) to silence unused function warnings when GCC is mistaken.
If left undefined, this is defined to __builtin_ofsetof(type, member).
If left undefined, this is defined to 0.