Code common to all BSPs.
More...
Code common to all BSPs.
Implements functions that are common to all BSPs.
◆ BSP_IRQ_DISABLED
| #define BSP_IRQ_DISABLED (0xFFU) |
Used to signify that an ELC event is not able to be used as an interrupt.
◆ SSP_ASSERT
Value:{ \
if ((a)) \
{ \
(void) 0; \
} \
else \
{ \
SSP_ASSERT_FAIL; \
return SSP_ERR_ASSERTION; \
} \
}
Default assertion calls SSP_ASSERT_FAIL if condition "a" is false. Used to identify incorrect use of API's in SSP functions.
◆ SSP_ASSERT_FAIL
Function call to insert before returning assertion error.
◆ SSP_CRITICAL_SECTION_DEFINE
| #define SSP_CRITICAL_SECTION_DEFINE uint32_t old_mask_level = 0U |
This check is performed to select suitable ASM API with respect to core This macro defines a variable for saving previous mask value
◆ SSP_CRITICAL_SECTION_ENTER
| #define SSP_CRITICAL_SECTION_ENTER |
Value:old_mask_level = __get_PRIMASK(); \
__set_PRIMASK(1U)
This macro defined to get the mask value
◆ SSP_CRITICAL_SECTION_EXIT
| #define SSP_CRITICAL_SECTION_EXIT __set_PRIMASK(old_mask_level) |
This macro defined to restore the old mask value
◆ SSP_ERROR_LOG
| #define SSP_ERROR_LOG |
( |
|
err, |
|
|
|
module, |
|
|
|
version |
|
) |
| |
This function is called before returning an error code. To stop on a runtime error, define ssp_error_log in user code and do required debugging (breakpoints, stack dump, etc) in this function.
◆ SSP_ERROR_RETURN
| #define SSP_ERROR_RETURN |
( |
|
a, |
|
|
|
err, |
|
|
|
module, |
|
|
|
version |
|
) |
| |
Value:{ \
if ((a)) \
{ \
(void) 0; \
} \
else \
{ \
SSP_ERROR_LOG((err), (module), (version)); \
return (err); \
} \
}
All SSP error codes are returned using this macro. Calls SSP_ERROR_LOG function if condition "a" is false. Used to identify runtime errors in SSP functions.
◆ R_BSP_VersionGet()
Set BSP version based on compile time macros.
- Parameters
-
| [out] | p_version | Memory address to return version information to. |
- Return values
-
| SSP_SUCCESS | Version information stored. |
| SSP_ERR_ASSERTION | The parameter p_version is NULL. |
◆ R_SSP_VersionGet()
Set SSP version based on compile time macros.
- Parameters
-
| [out] | p_version | Memory address to return version information to. |
- Return values
-
| SSP_SUCCESS | Version information stored. |
| SSP_ERR_ASSERTION | The parameter p_version is NULL. |