コード例 #1
0
ファイル: PWM_PM.c プロジェクト: CarsonMiller/Lima_Light
/*******************************************************************************
* Function Name: PWM_Wakeup
********************************************************************************
*
* Summary:
*  Restores the user configuration and restores the enable state.
*
* Parameters:
*  None
*
* Return:
*  None
*
*******************************************************************************/
void PWM_Wakeup(void)
{
    PWM_RestoreConfig();

    if(0u != PWM_backup.enableState)
    {
        PWM_Enable();
    }
}
コード例 #2
0
/*******************************************************************************
* Function Name: PWM_Wakeup
********************************************************************************
*
* Summary:
*  Restores and enables the user configuration. Should be called just after
*  awaking from sleep.
*
* Parameters:
*  void
*
* Return:
*  void
*
* Global variables:
*  PWM_backup.pwmEnable:  Is used to restore the enable state of
*  block on wakeup from sleep mode.
*
*******************************************************************************/
void PWM_Wakeup(void)
{
    /* Restore registers values */
    PWM_RestoreConfig();

    if(PWM_backup.PWMEnableState != 0u)
    {
        /* Enable component's operation */
        PWM_Enable();
    } /* Do nothing if component's block was disabled before */

}