Synergy Software Package User's Manual
Module Start and Stop

Macros

#define BSP_COMPILE_TIME_ASSERT(e)   ((void) sizeof(char[1 - 2 * !(e)]))
 

Functions

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. More...
 
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. More...
 
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. More...
 
ssp_err_t R_BSP_ModuleStateGet (ssp_feature_t const *const p_feature, bool *const p_stop)
 

Detailed Description

Module start and stop functions are provided to enable or disable peripherals.

Macro Definition Documentation

◆ 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().

Function Documentation

◆ 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_featurePointer to definition of the feature, defined by ssp_feature_t.
Return values
SSP_SUCCESSModule is started
SSP_ERR_ASSERTIONp_feature::id is invalid
SSP_ERR_INVALID_ARGUMENTModule 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_featurePointer to definition of the feature, defined by ssp_feature_t.
Return values
SSP_SUCCESSModule is stopped
SSP_ERR_ASSERTIONp_feature::id is invalid
SSP_ERR_INVALID_ARGUMENTModule 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_featurePointer to definition of the feature, defined by ssp_feature_t.
Return values
SSP_SUCCESSModule is stopped
SSP_ERR_ASSERTIONp_feature::id is invalid