#ifndef __TIM_H_
#define __TIM_H_
#include "stm32f10x.h"

extern u16 CCR1_Val;
extern u16 CCR2_Val;
extern u16 CCR3_Val;
extern u16 CCR4_Val;

extern u16 Time2us;
//extern u16 Time1ms;

extern void TIM2_Configuration(void);
extern void TIM2_NVIC_Configuration(void);

void Tim2_delay_us(u16 Time1us);

//#define  delay_us(us)   Tim2_delay_us(us)//sysWait(((us)*(SYSCLK)-(B))/(A))
//#define  delay_ms(ms)   sysTick_delay_ms(ms)
//#define  delay_s(s)     sysTick_delay_ms(s*1000)

#endif

