/******************************************************************************* * Function Name: PWM_1_Wakeup ******************************************************************************** * * Summary: * Restores the user configuration and restores the enable state. * * Parameters: * None * * Return: * None * *******************************************************************************/ void PWM_1_Wakeup(void) { PWM_1_RestoreConfig(); if(0u != PWM_1_backup.enableState) { PWM_1_Enable(); } }
/******************************************************************************* * Function Name: PWM_1_Wakeup ******************************************************************************** * * Summary: * Restores and enables the user configuration. Should be called just after * awaking from sleep. * * Parameters: * None * * Return: * None * * Global variables: * PWM_1_backup.pwmEnable: Is used to restore the enable state of * block on wakeup from sleep mode. * *******************************************************************************/ void PWM_1_Wakeup(void) { /* Restore registers values */ PWM_1_RestoreConfig(); if(PWM_1_backup.PWMEnableState != 0u) { /* Enable component's operation */ PWM_1_Enable(); } /* Do nothing if component's block was disabled before */ }