Demo entry 6362039

ZY

   

Submitted by Zhao Yi on May 06, 2017 at 10:25
Language: C. Code size: 622 Bytes.

void	Timer_config(void)
{
	TIM_InitTypeDef		TIM_InitStructure;					
	TIM_InitStructure.TIM_Mode      = TIM_16BitAutoReload;	  TIM_16BitAutoReload,TIM_16Bit,TIM_8BitAutoReload,TIM_16BitAutoReloadNoMask
	TIM_InitStructure.TIM_Polity    = PolityHigh;			
	TIM_InitStructure.TIM_Interrupt = ENABLE;				
	TIM_InitStructure.TIM_ClkSource = TIM_CLOCK_12T;			
        TIM_CLOCK_1T,TIM_CLOCK_12T,TIM_CLOCK_Ext
	TIM_InitStructure.TIM_ClkOut    = ENABLE;				
	TIM_InitStructure.TIM_Value     = 65536UL - (MAIN_Fosc / 184UL);		
	TIM_InitStructure.TIM_Run       = ENABLE;				
	Timer_Inilize(Timer0,&TIM_InitStructure);				
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).