Module start and stop functions are provided to enable or disable peripherals.
◆ BSP_COMPILE_TIME_ASSERT
| #define BSP_COMPILE_TIME_ASSERT |
( |
|
e | ) |
((void) sizeof(char[1 - 2 * !(e)])) |
Used to generate a compiler error (divided by 0 error) if the assertion fails. This is used in place of "#error" for expressions that cannot be evaluated by the preprocessor like sizeof().
◆ R_BSP_ModuleStart()
| ssp_err_t R_BSP_ModuleStart |
( |
ssp_feature_t const *const |
p_feature | ) |
|
Start module (cancel module stop). Starting a module enables clocks to the peripheral and allows registers to be set.
- Parameters
-
| [in] | p_feature | Pointer to definition of the feature, defined by ssp_feature_t. |
- Return values
-
| SSP_SUCCESS | Module is started |
| SSP_ERR_ASSERTION | p_feature::id is invalid |
| SSP_ERR_INVALID_ARGUMENT | Module has no module stop bit. |
◆ R_BSP_ModuleStateGet()
| ssp_err_t R_BSP_ModuleStateGet |
( |
ssp_feature_t const *const |
p_feature, |
|
|
bool *const |
p_stop |
|
) |
| |
The g_bsp_module_stop array must have entries for each ssp_ip_t enum value.
Save the current module state
◆ R_BSP_ModuleStop()
| ssp_err_t R_BSP_ModuleStop |
( |
ssp_feature_t const *const |
p_feature | ) |
|
Stop module (enter module stop). Stopping a module disables clocks to the peripheral to save power.
- Note
- Some module stop bits are shared between peripherals. Modules with shared module stop bits cannot be stopped to prevent unintentionally stopping related modules.
- Parameters
-
| [in] | p_feature | Pointer to definition of the feature, defined by ssp_feature_t. |
- Return values
-
| SSP_SUCCESS | Module is stopped |
| SSP_ERR_ASSERTION | p_feature::id is invalid |
| SSP_ERR_INVALID_ARGUMENT | Module has no module stop bit, or module stop bit is shared and entering module stop is not supported because it could affect other modules. |
◆ R_BSP_ModuleStopAlways()
| ssp_err_t R_BSP_ModuleStopAlways |
( |
ssp_feature_t const *const |
p_feature | ) |
|
Stop module (enter module stop) even if the module is used for multiple channels.
- Parameters
-
| [in] | p_feature | Pointer to definition of the feature, defined by ssp_feature_t. |
- Return values
-
| SSP_SUCCESS | Module is stopped |
| SSP_ERR_ASSERTION | p_feature::id is invalid |