/******************************************************************************* * Function Name: SPIM_Sleep ******************************************************************************** * * Summary: * Prepare SPIM Component goes to sleep. * * Parameters: * None. * * Return: * None. * * Global Variables: * SPIM_backup - modified when non-retention registers are saved. * * Reentrant: * No. * *******************************************************************************/ void SPIM_Sleep(void) { /* Save components enable state */ SPIM_backup.enableState = ((uint8) SPIM_IS_ENABLED); SPIM_Stop(); SPIM_SaveConfig(); }
/******************************************************************************* * Function Name: SPIM_Sleep ******************************************************************************** * * Summary: * Prepare SPIM Component goes to sleep. * * Parameters: * None. * * Return: * None. * * Global Variables: * SPIM_backup - modified when non-retention registers are saved. * * Reentrant: * No. * *******************************************************************************/ void SPIM_Sleep(void) { /* Save components enable state */ if ((SPIM_TX_STATUS_ACTL_REG & SPIM_INT_ENABLE) == SPIM_INT_ENABLE) { SPIM_backup.enableState = 1u; } else /* Components block is disabled */ { SPIM_backup.enableState = 0u; } SPIM_Stop(); SPIM_SaveConfig(); }