|
modm API documentation
|
Classes | |
| class | modm::PeripheralDriver |
| #define | MODM_COMPILER_STRING |
| Compiler description string. | |
| #define | MODM_COMPILER_GCC |
| Compiling with GCC. | |
| #define | MODM_COMPILER_MINGW |
| Compiling with GCC on Windows. | |
| #define | MODM_OS_STRING |
| Operating system description string. | |
| #define | MODM_OS_UNIX |
| Compiling for a UNIX target. | |
| #define | MODM_OS_LINUX |
| Compiling for a Linux target. | |
| #define | MODM_OS_OSX |
| Compiling for a macOS target. | |
| #define | MODM_OS_WIN32 |
| Compiling for a Windows 32-bit target. | |
| #define | MODM_OS_WIN64 |
| Compiling for a Windows 64-bit target. | |
| #define | MODM_OS_HOSTED |
| Compiling for a hosted (non-barebone) target. | |
| #define | MODM_OS_NONE |
| Compiling for a barebone target without OS. | |
| #define | MODM_CPU_STRING |
| CPU description string. | |
| #define | MODM_CPU_AMD64 |
| Compiling for x86-64 target. | |
| #define | MODM_CPU_I386 |
| Compiling for x86 target. | |
| #define | MODM_CPU_AVR |
| Compiling for AVR target. | |
| #define | MODM_CPU_ATMEGA |
| Compiling for AVR ATmega target. | |
| #define | MODM_CPU_ATTINY |
| Compiling for AVR ATtiny target. | |
| #define | MODM_CPU_ARM |
| Compiling for ARM target. | |
| #define | MODM_CPU_CORTEX_M0 |
| Compiling for ARM Cortex-M0 or Cortex-M0+ target. | |
| #define | MODM_CPU_CORTEX_M3 |
| Compiling for ARM Cortex-M3 target. | |
| #define | MODM_CPU_CORTEX_M4 |
| Compiling for ARM Cortex-M4 or Cortex-M7 target. | |
| #define | MODM_CPU_CORTEX_M33 |
| Compiling for ARM Cortex-M33 target. | |
| #define | MODM_CPU_AARCH64 |
| Compiling for ARM AArch64 target. | |
| #define | MODM_ALIGNMENT |
| Native memory alignment in bytes. | |
| #define | MODM_IS_LITTLE_ENDIAN |
| Compiling for a little endian memory layout. | |
| #define | MODM_IS_BIG_ENDIAN |
| Compiling for a big endian memory layout. | |
| #define | MODM_SIZEOF_POINTER |
| Size of pointer in bytes. | |
| #define | MODM_DEBUG_BUILD |
| Only defined in debug profile. | |
| #define | MODM_STRINGIFY(s) #s |
| Convert the argument into a C-String. | |
| #define | MODM_CONCAT(a, b) a ## b |
| Concatenate two arguments. | |
| #define | MODM_CONCAT3(a, b, c) a ## b ## c |
| Concatenate three arguments. | |
| #define | MODM_CONCAT4(a, b, c, d) a ## b ## c ## d |
| Concatenate four arguments. | |
| #define | MODM_CONCAT5(a, b, c, d, e) a ## b ## c ## d ## e |
| Concatenate five arguments. | |
| #define | MODM_ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0])) |
| Compute the size of a static (!) array. | |
| #define | MODM_IMPORT_BINARY(name, file, section) |
| #define | modm_always_inline |
| #define | modm_noinline |
| #define | modm_unused |
| #define | modm_weak |
| Causes the declaration to be emitted as a weak symbol rather than a global. | |
| #define | modm_aligned(n) |
| Specifies a minimum alignment for the function, measured in bytes. | |
| #define | modm_packed |
| Specifies that a variable or structure field should have the smallest possible alignment. | |
| #define | modm_section(s) |
| Specifies that a variable (or function) lives in a particular section. | |
| #define | modm_deprecated(msg) |
| #define | modm_naked |
| Tells the compiler to not generate prologue/epilogue code for this function. | |
| #define | modm_noreturn |
| #define | modm_fastcode |
| #define | modm_fastdata |
| #define | modm_faststack |
| #define | modm_likely(x) (x) |
| #define | modm_unlikely(x) (x) |
| #define | modm_fallthrough |
lbuild module: modm:architecture
All hardware peripherals with common interfaces.
| #define modm_always_inline |
Force inlining on functions if absolutely necessary (it rarely is).
| #define modm_deprecated |
Marks a declaration as deprecated and displays a message.
[[deprecated(msg)]] in a C++ context instead. | #define modm_fallthrough |
Mark a case statement as fallthrough.
[[fallthrough]] in a C++ context instead. | #define modm_fastcode |
Places a function in the fastest executable memory: instruction cache, core coupled memory or SRAM as fallback.
| #define modm_fastdata |
Places a variable in the fastest accessible memory: data cache, core coupled memory or SRAM as fallback.
| #define modm_faststack |
Places an array into the fastest accessible memory with DMA access: data cache, core coupled memory or SRAM as fallback.
| #define MODM_IMPORT_BINARY |
Include a binary file into a specific section (usually ".rodata"). Access via extern "C" uint8_t {{name}}[]; extern "C" uint8_t {{name}}_length[];.
| #define modm_likely(x) (x) |
This branch is more likely to execute.
[[likely]] in a C++ context instead. | #define modm_noinline |
Specifies that a function should never be inlined.
[[noinline]] in a C++ context instead. | #define modm_noreturn |
Tells the compiler that the function never returns.
[[noreturn]] in a C++ context instead. | #define modm_unlikely(x) (x) |
This branch is less likely to execute.
[[unlikely]] in a C++ context instead. | #define modm_unused |
Attached to a variable or a function this means that it is meant to be possibly unused.
[[maybe_unused]] in a C++ context instead.