Exemple #1
0
/*******************************************************************************
* Function Name: Counter_1_Start
********************************************************************************
* Summary:
*  Enables the counter for operation 
*
* Parameters:  
*  void  
*
* Return: 
*  void
*
* Global variables:
*  Counter_1_initVar: Is modified when this function is called for the  
*   first time. Is used to ensure that initialization happens only once.
*
*******************************************************************************/
void Counter_1_Start(void) 
{
    if(Counter_1_initVar == 0u)
    {
        Counter_1_Init();
        
        Counter_1_initVar = 1u; /* Clear this bit for Initialization */        
    }
    
    /* Enable the Counter */
    Counter_1_Enable();        
}
Exemple #2
0
/*******************************************************************************
* Function Name: Counter_1_Wakeup
********************************************************************************
*
* Summary:
*  Restores and enables the user configuration
*  
* Parameters:  
*  void
*
* Return: 
*  void
*
* Global variables:
*  Counter_1_backup.enableState:  Is used to restore the enable state of 
*  block on wakeup from sleep mode.
*
*******************************************************************************/
void Counter_1_Wakeup(void) 
{
    Counter_1_RestoreConfig();
    #if(!Counter_1_ControlRegRemoved)
        if(Counter_1_backup.CounterEnableState == 1u)
        {
            /* Enable Counter's operation */
            Counter_1_Enable();
        } /* Do nothing if Counter was disabled before */    
    #endif /* (!Counter_1_ControlRegRemoved) */
    
}