Macros | |
#define | MBED_PACKED(struct) struct __attribute__((packed)) |
MBED_PACKED Pack a structure, preventing any padding from being added between fields. More... | |
#define | MBED_ALIGN(N) __attribute__((aligned(N))) |
MBED_ALIGN(N) Declare a variable to be aligned on an N-byte boundary. More... | |
#define | MBED_UNUSED |
MBED_UNUSED Declare a function argument to be unused, suppressing compiler warnings. More... | |
#define | MBED_USED |
MBED_USED Inform the compiler that a static variable is to be retained in the object file, even if it is unreferenced. More... | |
#define | MBED_WEAK __attribute__((weak)) |
MBED_WEAK Mark a function as being weak. More... | |
#define | MBED_PURE |
MBED_COMPILER_BARRIER Stop the compiler moving memory accesses. More... | |
#define | MBED_NOINLINE |
MBED_NOINLINE Declare a function that must not be inlined. More... | |
#define | MBED_FORCEINLINE inline |
MBED_FORCEINLINE Declare a function that must always be inlined. More... | |
#define | MBED_NORETURN |
MBED_NORETURN Declare a function that will never return. More... | |
#define | MBED_UNREACHABLE while (1) |
MBED_UNREACHABLE An unreachable statement. More... | |
#define | MBED_DEPRECATED_SINCE(D, M) MBED_DEPRECATED(M " [since " D "]") |
MBED_DEPRECATED("message string") Mark a function declaration as deprecated, if it used then a warning will be issued by the compiler possibly including the provided message. More... | |
#define | MBED_CALLER_ADDR() (NULL) |
MBED_CALLER_ADDR() Returns the caller of the current function. More... | |
#define | MBED_PRETTY_FUNCTION __PRETTY_FUNCTION__ |
Macro expanding to a string literal of the enclosing function name. More... | |
#define | MBED_NONSECURE_ENTRY |
MBED_NONSECURE_ENTRY Declare a function that can be called from non-secure world or secure world. More... | |
#define MBED_ALIGN | ( | N | ) | __attribute__((aligned(N))) |
MBED_ALIGN(N) Declare a variable to be aligned on an N-byte boundary.
Definition at line 81 of file mbed_toolchain.h.
#define MBED_CALLER_ADDR | ( | ) | (NULL) |
MBED_CALLER_ADDR() Returns the caller of the current function.
Definition at line 400 of file mbed_toolchain.h.
#define MBED_DEPRECATED_SINCE | ( | D, | |
M | |||
) | MBED_DEPRECATED(M " [since " D "]") |
MBED_DEPRECATED("message string") Mark a function declaration as deprecated, if it used then a warning will be issued by the compiler possibly including the provided message.
Note that not all compilers are able to display the message.
MBED_DEPRECATED_SINCE("version", "message string") Mark a function declaration as deprecated, noting that the declaration was deprecated on the specified version. If the function is used then a warning will be issued by the compiler possibly including the provided message. Note that not all compilers are able to display this message.
Definition at line 378 of file mbed_toolchain.h.
#define MBED_FORCEINLINE inline |
MBED_FORCEINLINE Declare a function that must always be inlined.
Failure to inline such a function will result in an error.
Definition at line 287 of file mbed_toolchain.h.
#define MBED_NOINLINE |
MBED_NOINLINE Declare a function that must not be inlined.
Definition at line 265 of file mbed_toolchain.h.
#define MBED_NONSECURE_ENTRY |
MBED_NONSECURE_ENTRY Declare a function that can be called from non-secure world or secure world.
Definition at line 514 of file mbed_toolchain.h.
#define MBED_NORETURN |
MBED_NORETURN Declare a function that will never return.
Definition at line 313 of file mbed_toolchain.h.
#define MBED_PACKED | ( | struct | ) | struct __attribute__((packed)) |
MBED_PACKED Pack a structure, preventing any padding from being added between fields.
Definition at line 57 of file mbed_toolchain.h.
#define MBED_PRETTY_FUNCTION __PRETTY_FUNCTION__ |
Macro expanding to a string literal of the enclosing function name.
The string returned takes into account language specificity and yield human readable content.
As an example, if the macro is used within a C++ function then the string literal containing the function name will contain the complete signature of the function - including template parameters - and namespace qualifications.
Definition at line 425 of file mbed_toolchain.h.
#define MBED_PURE |
MBED_COMPILER_BARRIER Stop the compiler moving memory accesses.
The barrier stops memory accesses from being moved from one side of the barrier to the other for safety against other threads and interrupts.
This macro should only be used if we know only one CPU is accessing the data, or we are otherwise synchronising CPUs via acquire/release instructions. Otherwise, use MBED_BARRIER, which will act as a compiler barrier and also a CPU barrier if necessary.
Definition at line 244 of file mbed_toolchain.h.
#define MBED_UNREACHABLE while (1) |
MBED_UNREACHABLE An unreachable statement.
If the statement is reached, behavior is undefined. Useful in situations where the compiler cannot deduce if the code is unreachable.
Definition at line 339 of file mbed_toolchain.h.
#define MBED_UNUSED |
MBED_UNUSED Declare a function argument to be unused, suppressing compiler warnings.
Definition at line 100 of file mbed_toolchain.h.
#define MBED_USED |
MBED_USED Inform the compiler that a static variable is to be retained in the object file, even if it is unreferenced.
Definition at line 120 of file mbed_toolchain.h.
#define MBED_WEAK __attribute__((weak)) |
MBED_WEAK Mark a function as being weak.
Definition at line 154 of file mbed_toolchain.h.