EZR32 Wonder Gecko Software Documentation
ezr32wg-doc-4.2.1
|
Emlib general purpose utilities.
. More...
Macros | |
#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) |
Functions | |
__STATIC_INLINE uint32_t | EFM32_CTZ (uint32_t value) |
Count trailing number of zero's. More... | |
#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 79 of file em_common.h.
Referenced by HIDKBD_SetupCmd(), KSZ8851SNL_SPI_Receive(), KSZ8851SNL_SPI_Transmit(), MSDD_Handler(), NORFLASH_Program(), RTCDRV_StartTimer(), USBH_GetStringB(), USBH_PrintConfigurationDescriptor(), USBH_QGetConfigurationDescriptor(), USBH_QueryDeviceB(), USBH_Read(), and USBH_Write().
#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 81 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 88 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 95 of file em_common.h.
#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 103 of file em_common.h.
Referenced by MSDH_GetBlockSize(), MSDH_GetSectorCount(), MSDH_GetSectorSize(), MSDH_Init(), MSDSCSI_Read10(), and MSDSCSI_Write10().
__STATIC_INLINE uint32_t EFM32_CTZ | ( | uint32_t | value | ) |
[in] | value | Data value to check for number of trailing zero bits. |
Definition at line 121 of file em_common.h.
Referenced by RMU_ResetControl().