コード例 #1
0
ファイル: PWM_1_PM.c プロジェクト: josndrew/fnir
/*******************************************************************************
* 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();
    }
}
コード例 #2
0
ファイル: PWM_1.c プロジェクト: Alberto-Castro/Ball-Plate
/*******************************************************************************
* Function Name: PWM_1_Start
********************************************************************************
*
* Summary:
*  The start function initializes the pwm with the default values, the
*  enables the counter to begin counting.  It does not enable interrupts,
*  the EnableInt command should be called if interrupt generation is required.
*
* Parameters:
*  None
*
* Return:
*  None
*
* Global variables:
*  PWM_1_initVar: Is modified when this function is called for the
*   first time. Is used to ensure that initialization happens only once.
*
*******************************************************************************/
void PWM_1_Start(void) 
{
    /* If not Initialized then initialize all required hardware and software */
    if(PWM_1_initVar == 0u)
    {
        PWM_1_Init();
        PWM_1_initVar = 1u;
    }
    PWM_1_Enable();

}
コード例 #3
0
ファイル: PWM_1_PM.c プロジェクト: CarsonMiller/Lima_Light
/*******************************************************************************
* 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 */
    
}