Esempio n. 1
0
//Delay function Initialization
void Delay_Init(void)
{
//Clear bits 
	TIM3_DeInit();
//Peripetial Initialization
	TIM3_TimeBaseInit(TIM3_PRESCALER_16, 999);
//Enable Periphs
	TIM3_Cmd(ENABLE);
//Interrupt configuration
	TIM3_ITConfig(TIM3_IT_UPDATE, ENABLE);
#ifndef __MODBUS_EN
	#define __DELAY_EN
	enableInterrupts();
#endif
}
Esempio n. 2
0
/**
  * @brief  Configure TIM3 peripheral   
  * @param  None
  * @retval None
  */
void _Device_Timer3_Init(void)
{
	int i;
    
    TIM3_DeInit();
                
    for(i = 0; i < Max_Timer3_INTERRUPT_Function_Calling; i++){
        Interrupt_Timer3_ptr_fuc[i] = empty_timer3_fun;
    }

    Setting_Interrupt_Calling_TimingDelay_Timer3 = 0;
    Interrupt_Calling_TimingDelay_counter_Timer3 = 0;


#if defined(System_Clock_Freq_8MHz)
    for(i = 0; i < Max_Timer3_Fast_INTERRUPT_Function_Calling; i++){
        Fast_Interrupt_Timer3_ptr_fuc[i] = empty_timer3_fun;
    }
    Setting_Fast_Interrupt_Calling_TimingDelay_Timer3 = 0;
    Fast_Interrupt_Calling_TimingDelay_counter_Timer3 = 0;
#endif

}