/******************************************************************************* * Function Name: Timer_2_Wakeup ******************************************************************************** * * Summary: * Restores the user configuration and restores the enable state. * * Parameters: * None * * Return: * None * *******************************************************************************/ void Timer_2_Wakeup(void) { Timer_2_RestoreConfig(); if(0u != Timer_2_backup.enableState) { Timer_2_Enable(); } }
/******************************************************************************* * Function Name: Timer_2_Wakeup ******************************************************************************** * * Summary: * Restores and enables the user configuration * * Parameters: * void * * Return: * void * * Global variables: * Timer_2_backup.enableState: Is used to restore the enable state of * block on wakeup from sleep mode. * *******************************************************************************/ void Timer_2_Wakeup(void) { Timer_2_RestoreConfig(); #if(!Timer_2_ControlRegRemoved) if(Timer_2_backup.TimerEnableState == 1u) { /* Enable Timer's operation */ Timer_2_Enable(); } /* Do nothing if Timer was disabled before */ #endif /* Remove this code section if Control register is removed */ }
/******************************************************************************* * Function Name: Timer_2_Start ******************************************************************************** * * Summary: * The start function initializes the timer with the default values, the * enables the timerto begin counting. It does not enable interrupts, * the EnableInt command should be called if interrupt generation is required. * * Parameters: * void * * Return: * void * * Global variables: * Timer_2_initVar: Is modified when this function is called for the * first time. Is used to ensure that initialization happens only once. * *******************************************************************************/ void Timer_2_Start(void) { if(Timer_2_initVar == 0u) { Timer_2_Init(); Timer_2_initVar = 1u; /* Clear this bit for Initialization */ } /* Enable the Timer */ Timer_2_Enable(); }