EFM32 general purpose utilities. More...
![]() |
Defines | |
#define | EFM32_MIN(a, b) ({ __typeof__(a) _a = (a); __typeof__(b) _b = (b); _a < _b ? _a : _b; }) |
#define | EFM32_MAX(a, b) ({ __typeof__(a) _a = (a); __typeof__(b) _b = (b); _a > _b ? _a : _b; }) |
#define | EFM32_PACK_START(x) |
#define | EFM32_PACK_END() |
#define | EFM32_ALIGN(X) |
EFM32 general purpose utilities.
#define EFM32_ALIGN | ( | X | ) |
Macro for aligning a variable.
Use this macro before the variable definition.
X denotes the storage alignment value in bytes.
On gcc use __attribute__ ((aligned(X))) before the ; on normal variables. Use __attribute__ ((aligned(X))) before the opening { on struct variables.
Definition at line 105 of file em_common.h.
#define EFM32_MAX | ( | a, | |||
b | ) | ({ __typeof__(a) _a = (a); __typeof__(b) _b = (b); _a > _b ? _a : _b; }) |
Macro for getting maximum value. No sideeffects, a and b are evaluated once only.
Definition at line 83 of file em_common.h.
#define EFM32_MIN | ( | a, | |||
b | ) | ({ __typeof__(a) _a = (a); __typeof__(b) _b = (b); _a < _b ? _a : _b; }) |
Macro for getting minimum value. No sideeffects, a and b are evaluated once only.
Definition at line 81 of file em_common.h.
#define EFM32_PACK_END | ( | ) |
Macro for handling packed structs.
Use this macro after the struct definition.
On gcc add __attribute__ ((packed)) after the closing } of the struct definition.
Definition at line 97 of file em_common.h.
#define EFM32_PACK_START | ( | x | ) |
Macro for handling packed structs.
Use this macro before the struct definition.
X denotes the maximum alignment of struct members. X is not supported on gcc, gcc always use 1 byte maximum alignment.
Definition at line 90 of file em_common.h.