![]() |
RTEMS 6.3
|
Macros | |
| #define | FSL_DRIVER_TRANSFER_DOUBLE_WEAK_IRQ 1 |
| Macro to use the default weak IRQ handler in drivers. | |
| #define | MAKE_STATUS(group, code) |
| Construct a status code value from a group and code number. | |
| #define | MAKE_VERSION(major, minor, bugfix) |
| Construct the version number for drivers. | |
Suppress fallthrough warning macro | |
| void * | SDK_Malloc (size_t size, size_t alignbytes) |
| Allocate memory with given alignment and aligned size. | |
| void | SDK_Free (void *ptr) |
| Free memory. | |
| void | SDK_DelayAtLeastUs (uint32_t delayTime_us, uint32_t coreClock_Hz) |
| Delay at least for some time. Please note that, this API uses while loop for delay, different run-time environments make the time not precise, if precise delay count was needed, please implement a new delay function with hardware timer. | |
| #define | SUPPRESS_FALL_THROUGH_WARNING() |
Min/max macros | |
| #define | MIN(a, b) |
| #define | MAX(a, b) |
| #define | ARRAY_SIZE(x) |
| Computes the number of elements in an array. | |
UINT16_MAX/UINT32_MAX value | |
| #define | UINT16_MAX ((uint16_t)-1) |
| #define | UINT32_MAX ((uint32_t)-1) |
UINTPTR_SIZE value | |
| #define | UINTPTR_SIZE 8 |
Atomic modification | |
These macros are used for atomic access, such as read-modify-write to the peripheral registers.
Take SDK_ATOMIC_LOCAL_CLEAR_AND_SET as an example: the parameter volatile uint32_t * reg = (volatile uint32_t *)REG_ADDR;
SDK_ATOMIC_LOCAL_CLEAR_AND_SET(reg, 0x03, 0x02);
In this example, the register bit1:bit0 are cleared and bit1 is set, as a result, register bit1:bit0 = 0b10.
| |
| #define | SDK_ATOMIC_LOCAL_ADD(addr, val) |
| #define | SDK_ATOMIC_LOCAL_SET(addr, bits) |
| #define | SDK_ATOMIC_LOCAL_CLEAR(addr, bits) |
| #define | SDK_ATOMIC_LOCAL_TOGGLE(addr, bits) |
| #define | SDK_ATOMIC_LOCAL_CLEAR_AND_SET(addr, clearBits, setBits) |
Timer utilities | |
| #define | USEC_TO_COUNT(us, clockFreqInHz) |
| #define | COUNT_TO_USEC(count, clockFreqInHz) |
| #define | MSEC_TO_COUNT(ms, clockFreqInHz) |
| #define | COUNT_TO_MSEC(count, clockFreqInHz) |
| #define | SDK_ISR_EXIT_BARRIER |
| #define | USEC_TO_COUNT(us, clockFreqInHz) |
| #define | COUNT_TO_USEC(count, clockFreqInHz) |
| #define | MSEC_TO_COUNT(ms, clockFreqInHz) |
| #define | COUNT_TO_MSEC(count, clockFreqInHz) |
| #define | SDK_ISR_EXIT_BARRIER |
Alignment variable definition macros | |
| #define | SDK_SIZEALIGN(var, alignbytes) |
| #define | SDK_ALIGN(var, alignbytes) |
| #define | SDK_SIZEALIGN(var, alignbytes) |
Non-cacheable region definition macros | |
| #define | AT_NONCACHEABLE_SECTION(var) |
| #define | AT_NONCACHEABLE_SECTION_ALIGN(var, alignbytes) |
| #define | AT_NONCACHEABLE_SECTION_INIT(var) |
| #define | AT_NONCACHEABLE_SECTION_ALIGN_INIT(var, alignbytes) |
| #define | AT_NONCACHEABLE_SECTION_INIT(var) |
| #define | AT_NONCACHEABLE_SECTION(var) |
| #define | AT_NONCACHEABLE_SECTION_ALIGN_INIT(var, alignbytes) |
| #define | AT_NONCACHEABLE_SECTION_ALIGN(var, alignbytes) |
Time sensitive region | |
| #define | AT_QUICKACCESS_SECTION_CODE(func) |
| #define | AT_QUICKACCESS_SECTION_DATA(func) |
| #define | NVIC_SetPriorityGrouping(value) |
| #define | NVIC_GetPriorityGrouping() |
| #define | NVIC_EnableIRQ(value) |
| #define | NVIC_GetEnableIRQ(value) |
| #define | NVIC_DisableIRQ(value) |
| #define | NVIC_GetPendingIRQ(value) |
| #define | NVIC_SetPendingIRQ(value) |
| #define | NVIC_ClearPendingIRQ(value) |
| #define | NVIC_GetActive(value) |
| #define ARRAY_SIZE | ( | x | ) |
Computes the number of elements in an array.
| #define AT_NONCACHEABLE_SECTION | ( | var | ) |
| #define AT_NONCACHEABLE_SECTION | ( | var | ) |
| #define AT_NONCACHEABLE_SECTION_ALIGN | ( | var, | |
| alignbytes ) |
| #define AT_NONCACHEABLE_SECTION_ALIGN | ( | var, | |
| alignbytes ) |
| #define AT_NONCACHEABLE_SECTION_ALIGN_INIT | ( | var, | |
| alignbytes ) |
| #define AT_NONCACHEABLE_SECTION_ALIGN_INIT | ( | var, | |
| alignbytes ) |
| #define AT_NONCACHEABLE_SECTION_INIT | ( | var | ) |
| #define AT_NONCACHEABLE_SECTION_INIT | ( | var | ) |
| #define AT_QUICKACCESS_SECTION_CODE | ( | func | ) |
| #define AT_QUICKACCESS_SECTION_DATA | ( | func | ) |
| #define COUNT_TO_MSEC | ( | count, | |
| clockFreqInHz ) |
Macro to convert a raw count value to millisecond
| #define COUNT_TO_MSEC | ( | count, | |
| clockFreqInHz ) |
Macro to convert a raw count value to millisecond
| #define COUNT_TO_USEC | ( | count, | |
| clockFreqInHz ) |
Macro to convert a raw count value to microsecond
| #define COUNT_TO_USEC | ( | count, | |
| clockFreqInHz ) |
Macro to convert a raw count value to microsecond
| #define DEBUG_CONSOLE_DEVICE_TYPE_FLEXCOMM 5U |
Debug console based on FLEXCOMM.
| #define DEBUG_CONSOLE_DEVICE_TYPE_IUART 6U |
Debug console based on i.MX UART.
| #define DEBUG_CONSOLE_DEVICE_TYPE_LPSCI 3U |
Debug console based on LPSCI.
| #define DEBUG_CONSOLE_DEVICE_TYPE_LPUART 2U |
Debug console based on LPUART.
| #define DEBUG_CONSOLE_DEVICE_TYPE_MINI_USART 8U |
Debug console based on LPC_USART.
| #define DEBUG_CONSOLE_DEVICE_TYPE_NONE 0U |
No debug console.
| #define DEBUG_CONSOLE_DEVICE_TYPE_QSCI 10U |
Debug console based on QSCI.
| #define DEBUG_CONSOLE_DEVICE_TYPE_SWO 9U |
Debug console based on SWO.
| #define DEBUG_CONSOLE_DEVICE_TYPE_UART 1U |
Debug console based on UART.
| #define DEBUG_CONSOLE_DEVICE_TYPE_USBCDC 4U |
Debug console based on USBCDC.
| #define DEBUG_CONSOLE_DEVICE_TYPE_VUSART 7U |
Debug console based on LPC_VUSART.
| #define MAKE_STATUS | ( | group, | |
| code ) |
| #define MAKE_VERSION | ( | major, | |
| minor, | |||
| bugfix ) |
Construct the version number for drivers.
The driver version is a 32-bit number, for both 32-bit platforms(such as Cortex M) and 16-bit platforms(such as DSC).
| Unused || Major Version || Minor Version || Bug Fix | 31 25 24 17 16 9 8 0
| #define MAX | ( | a, | |
| b ) |
| #define MIN | ( | a, | |
| b ) |
| #define MSEC_TO_COUNT | ( | ms, | |
| clockFreqInHz ) |
Macro to convert a millisecond period to raw count value
| #define MSEC_TO_COUNT | ( | ms, | |
| clockFreqInHz ) |
Macro to convert a millisecond period to raw count value
| #define NVIC_ClearPendingIRQ | ( | value | ) |
| #define NVIC_DisableIRQ | ( | value | ) |
| #define NVIC_EnableIRQ | ( | value | ) |
| #define NVIC_GetActive | ( | value | ) |
| #define NVIC_GetEnableIRQ | ( | value | ) |
| #define NVIC_GetPendingIRQ | ( | value | ) |
| #define NVIC_GetPriorityGrouping | ( | ) |
| #define NVIC_SetPendingIRQ | ( | value | ) |
| #define NVIC_SetPriorityGrouping | ( | value | ) |
| #define SDK_ALIGN | ( | var, | |
| alignbytes ) |
Macro to define a variable with alignbytes alignment
| #define SDK_ATOMIC_LOCAL_ADD | ( | addr, | |
| val ) |
| #define SDK_ATOMIC_LOCAL_CLEAR | ( | addr, | |
| bits ) |
| #define SDK_ATOMIC_LOCAL_CLEAR_AND_SET | ( | addr, | |
| clearBits, | |||
| setBits ) |
| #define SDK_ATOMIC_LOCAL_SET | ( | addr, | |
| bits ) |
| #define SDK_ATOMIC_LOCAL_TOGGLE | ( | addr, | |
| bits ) |
| #define SDK_SIZEALIGN | ( | var, | |
| alignbytes ) |
Macro to define a variable with L1 d-cache line size alignment
Macro to define a variable with L2 cache line size alignment
Macro to change a value to a given size aligned value
| #define SDK_SIZEALIGN | ( | var, | |
| alignbytes ) |
Macro to define a variable with L1 d-cache line size alignment
Macro to define a variable with L2 cache line size alignment
Macro to change a value to a given size aligned value
| #define USEC_TO_COUNT | ( | us, | |
| clockFreqInHz ) |
Macro to convert a microsecond period to raw count value
| #define USEC_TO_COUNT | ( | us, | |
| clockFreqInHz ) |
Macro to convert a microsecond period to raw count value
| anonymous enum |
Generic status return codes.
| enum _status_groups |
Status group numbers.
| Enumerator | |
|---|---|
| kStatusGroup_Generic | Group number for generic status codes. |
| kStatusGroup_FLASH | Group number for FLASH status codes. |
| kStatusGroup_LPSPI | Group number for LPSPI status codes. |
| kStatusGroup_FLEXIO_SPI | Group number for FLEXIO SPI status codes. |
| kStatusGroup_DSPI | Group number for DSPI status codes. |
| kStatusGroup_FLEXIO_UART | Group number for FLEXIO UART status codes. |
| kStatusGroup_FLEXIO_I2C | Group number for FLEXIO I2C status codes. |
| kStatusGroup_LPI2C | Group number for LPI2C status codes. |
| kStatusGroup_UART | Group number for UART status codes. |
| kStatusGroup_I2C | Group number for UART status codes. |
| kStatusGroup_LPSCI | Group number for LPSCI status codes. |
| kStatusGroup_LPUART | Group number for LPUART status codes. |
| kStatusGroup_SPI | Group number for SPI status code. |
| kStatusGroup_XRDC | Group number for XRDC status code. |
| kStatusGroup_SEMA42 | Group number for SEMA42 status code. |
| kStatusGroup_SDHC | Group number for SDHC status code |
| kStatusGroup_SDMMC | Group number for SDMMC status code |
| kStatusGroup_SAI | Group number for SAI status code |
| kStatusGroup_MCG | Group number for MCG status codes. |
| kStatusGroup_SCG | Group number for SCG status codes. |
| kStatusGroup_SDSPI | Group number for SDSPI status codes. |
| kStatusGroup_FLEXIO_I2S | Group number for FLEXIO I2S status codes |
| kStatusGroup_FLEXIO_MCULCD | Group number for FLEXIO LCD status codes |
| kStatusGroup_FLASHIAP | Group number for FLASHIAP status codes |
| kStatusGroup_FLEXCOMM_I2C | Group number for FLEXCOMM I2C status codes |
| kStatusGroup_I2S | Group number for I2S status codes |
| kStatusGroup_IUART | Group number for IUART status codes |
| kStatusGroup_CSI | Group number for CSI status codes |
| kStatusGroup_MIPI_DSI | Group number for MIPI DSI status codes |
| kStatusGroup_SDRAMC | Group number for SDRAMC status codes. |
| kStatusGroup_POWER | Group number for POWER status codes. |
| kStatusGroup_ENET | Group number for ENET status codes. |
| kStatusGroup_PHY | Group number for PHY status codes. |
| kStatusGroup_TRGMUX | Group number for TRGMUX status codes. |
| kStatusGroup_SMARTCARD | Group number for SMARTCARD status codes. |
| kStatusGroup_LMEM | Group number for LMEM status codes. |
| kStatusGroup_QSPI | Group number for QSPI status codes. |
| kStatusGroup_DMA | Group number for DMA status codes. |
| kStatusGroup_EDMA | Group number for EDMA status codes. |
| kStatusGroup_DMAMGR | Group number for DMAMGR status codes. |
| kStatusGroup_FLEXCAN | Group number for FlexCAN status codes. |
| kStatusGroup_LTC | Group number for LTC status codes. |
| kStatusGroup_FLEXIO_CAMERA | Group number for FLEXIO CAMERA status codes. |
| kStatusGroup_LPC_SPI | Group number for LPC_SPI status codes. |
| kStatusGroup_LPC_USART | Group number for LPC_USART status codes. |
| kStatusGroup_DMIC | Group number for DMIC status codes. |
| kStatusGroup_SDIF | Group number for SDIF status codes. |
| kStatusGroup_SPIFI | Group number for SPIFI status codes. |
| kStatusGroup_OTP | Group number for OTP status codes. |
| kStatusGroup_MCAN | Group number for MCAN status codes. |
| kStatusGroup_CAAM | Group number for CAAM status codes. |
| kStatusGroup_ECSPI | Group number for ECSPI status codes. |
| kStatusGroup_USDHC | Group number for USDHC status codes. |
| kStatusGroup_LPC_I2C | Group number for LPC_I2C status codes. |
| kStatusGroup_DCP | Group number for DCP status codes. |
| kStatusGroup_MSCAN | Group number for MSCAN status codes. |
| kStatusGroup_ESAI | Group number for ESAI status codes. |
| kStatusGroup_FLEXSPI | Group number for FLEXSPI status codes. |
| kStatusGroup_MMDC | Group number for MMDC status codes. |
| kStatusGroup_PDM | Group number for MIC status codes. |
| kStatusGroup_SDMA | Group number for SDMA status codes. |
| kStatusGroup_ICS | Group number for ICS status codes. |
| kStatusGroup_SPDIF | Group number for SPDIF status codes. |
| kStatusGroup_LPC_MINISPI | Group number for LPC_MINISPI status codes. |
| kStatusGroup_HASHCRYPT | Group number for Hashcrypt status codes |
| kStatusGroup_LPC_SPI_SSP | Group number for LPC_SPI_SSP status codes. |
| kStatusGroup_I3C | Group number for I3C status codes |
| kStatusGroup_LPC_I2C_1 | Group number for LPC_I2C_1 status codes. |
| kStatusGroup_NOTIFIER | Group number for NOTIFIER status codes. |
| kStatusGroup_DebugConsole | Group number for debug console status codes. |
| kStatusGroup_SEMC | Group number for SEMC status codes. |
| kStatusGroup_ApplicationRangeStart | Starting number for application groups. |
| kStatusGroup_IAP | Group number for IAP status codes |
| kStatusGroup_SFA | Group number for SFA status codes |
| kStatusGroup_SPC | Group number for SPC status codes. |
| kStatusGroup_PUF | Group number for PUF status codes. |
| kStatusGroup_TOUCH_PANEL | Group number for touch panel status codes |
| kStatusGroup_VBAT | Group number for VBAT status codes |
| kStatusGroup_HAL_GPIO | Group number for HAL GPIO status codes. |
| kStatusGroup_HAL_UART | Group number for HAL UART status codes. |
| kStatusGroup_HAL_TIMER | Group number for HAL TIMER status codes. |
| kStatusGroup_HAL_SPI | Group number for HAL SPI status codes. |
| kStatusGroup_HAL_I2C | Group number for HAL I2C status codes. |
| kStatusGroup_HAL_FLASH | Group number for HAL FLASH status codes. |
| kStatusGroup_HAL_PWM | Group number for HAL PWM status codes. |
| kStatusGroup_HAL_RNG | Group number for HAL RNG status codes. |
| kStatusGroup_HAL_I2S | Group number for HAL I2S status codes. |
| kStatusGroup_TIMERMANAGER | Group number for TiMER MANAGER status codes. |
| kStatusGroup_SERIALMANAGER | Group number for SERIAL MANAGER status codes. |
| kStatusGroup_LED | Group number for LED status codes. |
| kStatusGroup_BUTTON | Group number for BUTTON status codes. |
| kStatusGroup_EXTERN_EEPROM | Group number for EXTERN EEPROM status codes. |
| kStatusGroup_SHELL | Group number for SHELL status codes. |
| kStatusGroup_MEM_MANAGER | Group number for MEM MANAGER status codes. |
| kStatusGroup_LIST | Group number for List status codes. |
| kStatusGroup_OSA | Group number for OSA status codes. |
| kStatusGroup_COMMON_TASK | Group number for Common task status codes. |
| kStatusGroup_MSG | Group number for messaging status codes. |
| kStatusGroup_SDK_OCOTP | Group number for OCOTP status codes. |
| kStatusGroup_SDK_FLEXSPINOR | Group number for FLEXSPINOR status codes. |
| kStatusGroup_CODEC | Group number for codec status codes. |
| kStatusGroup_ASRC | Group number for codec status ASRC. |
| kStatusGroup_OTFAD | Group number for codec status codes. |
| kStatusGroup_SDIOSLV | Group number for SDIOSLV status codes. |
| kStatusGroup_MECC | Group number for MECC status codes. |
| kStatusGroup_ENET_QOS | Group number for ENET_QOS status codes. |
| kStatusGroup_LOG | Group number for LOG status codes. |
| kStatusGroup_I3CBUS | Group number for I3CBUS status codes. |
| kStatusGroup_QSCI | Group number for QSCI status codes. |
| kStatusGroup_SNT | Group number for SNT status codes. |
| kStatusGroup_QUEUEDSPI | Group number for QSPI status codes. |
| kStatusGroup_POWER_MANAGER | Group number for POWER_MANAGER status codes. |
| kStatusGroup_IPED | Group number for IPED status codes. |
| kStatusGroup_CSS_PKC | Group number for CSS PKC status codes. |
| kStatusGroup_HOSTIF | Group number for HOSTIF status codes. |
| kStatusGroup_CLIF | Group number for CLIF status codes. |
| kStatusGroup_BMA | Group number for BMA status codes. |
| kStatusGroup_NETC | Group number for NETC status codes. |
| void SDK_DelayAtLeastUs | ( | uint32_t | delayTime_us, |
| uint32_t | coreClock_Hz ) |
Delay at least for some time. Please note that, this API uses while loop for delay, different run-time environments make the time not precise, if precise delay count was needed, please implement a new delay function with hardware timer.
Delay at least for some time. Please note that, if not uses DWT, this API will use while loop for delay, different run-time environments have effect on the delay time. If precise delay is needed, please enable DWT delay. The two parmeters delayTime_us and coreClock_Hz have limitation. For example, in the platform with 1GHz coreClock_Hz, the delayTime_us only supports up to 4294967 in current code. If long time delay is needed, please implement a new delay function.
| delayTime_us | Delay time in unit of microsecond. |
| coreClock_Hz | Core clock frequency with Hz. |
Delay at least for some time. Please note that, this API uses while loop for delay, different run-time environments make the time not precise, if precise delay count was needed, please implement a new delay function with hardware timer.
| delayTime_us | Delay time in unit of microsecond. |
| coreClock_Hz | Core clock frequency with Hz. |
| void SDK_Free | ( | void * | ptr | ) |
Free memory.
| ptr | The memory to be release. |
| void * SDK_Malloc | ( | size_t | size, |
| size_t | alignbytes ) |
Allocate memory with given alignment and aligned size.
This is provided to support the dynamically allocated memory used in cache-able region.
| size | The length required to malloc. |
| alignbytes | The alignment size. |
| The | allocated memory. |