#ifndef _BSPTIME2_h_
#define _BSPTIME2_h_

#include <stm32f10x.h>

enum {
    eTimLed,
    eTimNrf,
    eTim3,
    eTim4,
    eTimMax,
};

//如果index对应的时间超时，清零并返回1，未超时返回0
#define IS_TIMEOUT_10MS(index, count)    ((g_Tim2Array[(u16)(index)] >= (count))?  \
                                        ((g_Tim2Array[(u16)(index)] = 0) == 0): 0)

extern volatile int g_Tim2Array[(u16)eTimMax];

void BspTim2Init(void);
void BspTim2Close(void);
void BspTim2SetCounter(u16 count);//设置计数值
void TIM_Delay10Ms(u16 dly_10ms);
u32 Get_RunTime(void);

#endif
