EFM32 Zero Gecko Software Documentation  efm32zg-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...
 

Detailed Description

Macro Definition Documentation

#define EFM32_MIN (   a,
 
)    ({ __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(), and RTCDRV_StartTimer().

#define EFM32_MAX (   a,
 
)    ({ __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().

Function Documentation

__STATIC_INLINE uint32_t EFM32_CTZ ( uint32_t  value)
Note
Disabling SWDClk will disable the debug interface, which may result in a lockout if done early in startup (before debugger is able to halt core).
Parameters
[in]valueData value to check for number of trailing zero bits.
Returns
Number of trailing zero's in value.

Definition at line 121 of file em_common.h.

Referenced by RMU_ResetControl().