#include <compiler.h>#include <stddef.h>#include <stdlib.h>#include <stdbool.h>#include <stdint.h>

Go to the source code of this file.
Macros | |
| #define | COMPILER_PACK_RESET() COMPILER_PRAGMA(pack()) |
| Set default alignment for subsequent structure and union definitions. More... | |
| #define | COMPILER_PACK_SET(alignment) COMPILER_PRAGMA(pack(alignment)) |
| Set maximum alignment for subsequent structure and union definitions to alignment. More... | |
| #define | COMPILER_PRAGMA(arg) _Pragma(#arg) |
| Emit the compiler pragma arg. More... | |
| #define | UNUSED(v) (void)(v) |
| Marking v as a unused parameter or value. More... | |
Token Paste | |
Paste N preprocessing tokens together, these tokens being allowed to be #defined. May be used only within macros with the tokens passed as arguments if the tokens are #defined. For example, writing TPASTE2(U, WIDTH) within a macro #defined by UTYPE(WIDTH) and invoked as UTYPE(UL_WIDTH) with UL_WIDTH #defined as 32 is equivalent to writing U32. | |
| #define | TPASTE2(a, b) a##b |
| #define | TPASTE3(a, b, c) a##b##c |
Mathematics | |
Set user-defined section. Place a data object or a function in a user-defined section. Set aligned boundary. Set word-aligned boundary. The same considerations as for clz and ctz apply here but GCC does not provide built-in functions to access the assembly instructions abs, min and max and it does not produce them by itself in most cases, so two sets of macros are defined here:
| |
| #define | min(a, b) Min(a, b) |
| Takes the minimal value of a and b. More... | |
| #define | max(a, b) Max(a, b) |
| Takes the maximal value of a and b. More... | |
Interrupt Service Routine definition | |
| #define | Enable_global_interrupt() cpu_irq_enable() |
| #define | Disable_global_interrupt() cpu_irq_disable() |
| #define | Is_global_interrupt_enabled() cpu_irq_is_enabled() |
Usual Constants | |
| #define | DISABLE 0 |
| #define | ENABLE 1 |
| #define | DISABLED 0 |
| #define | ENABLED 1 |
| #define | OFF 0 |
| #define | ON 1 |
| #define | FALSE 0 |
| #define | TRUE 1 |
| #define | false FALSE |
| #define | true TRUE |
| #define | KO 0 |
| #define | OK 1 |
| #define | PASS 0 |
| #define | FAIL 1 |
| #define | LOW 0 |
| #define | HIGH 1 |
| #define | CLR 0 |
| #define | SET 1 |
| #define COMPILER_PACK_RESET | ( | ) | COMPILER_PRAGMA(pack()) |
Set default alignment for subsequent structure and union definitions.
Definition at line 162 of file libchip_compiler.h.
| #define COMPILER_PACK_SET | ( | alignment | ) | COMPILER_PRAGMA(pack(alignment)) |
Set maximum alignment for subsequent structure and union definitions to alignment.
Definition at line 155 of file libchip_compiler.h.
| #define COMPILER_PRAGMA | ( | arg | ) | _Pragma(#arg) |
Emit the compiler pragma arg.
| arg | The pragma directive as it would appear after #pragma (i.e. not stringified). |
Definition at line 148 of file libchip_compiler.h.
| #define max | ( | a, | |
| b | |||
| ) | Max(a, b) |
Takes the maximal value of a and b.
| a | Input value. |
| b | Input value. |
Definition at line 272 of file libchip_compiler.h.
| #define min | ( | a, | |
| b | |||
| ) | Min(a, b) |
Takes the minimal value of a and b.
| a | Input value. |
| b | Input value. |
Definition at line 261 of file libchip_compiler.h.
| #define TPASTE2 | ( | a, | |
| b | |||
| ) | a##b |
Definition at line 121 of file libchip_compiler.h.
| #define TPASTE3 | ( | a, | |
| b, | |||
| c | |||
| ) | a##b##c |
Definition at line 122 of file libchip_compiler.h.
| #define UNUSED | ( | v | ) | (void)(v) |
Marking v as a unused parameter or value.
Definition at line 287 of file libchip_compiler.h.