|
|
@ -3,6 +3,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
#define BASE ((TIM_TypeDef *)timerBase_Addr_List[timer])
|
|
|
|
#define BASE ((TIM_TypeDef *)timerBase_Addr_List[timer])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define HANDLE_INT_FLAG(flagReg, flagMask, intType) \
|
|
|
|
|
|
|
|
do { \ // do{ ... }while(1) is used to insure that this makro acts as a function call
|
|
|
|
|
|
|
|
if ((flagReg) & (flagMask)) { \ // check if flag is set
|
|
|
|
|
|
|
|
(flagReg) &= ~(flagMask); \ // clear flag
|
|
|
|
|
|
|
|
((intHandler_t)(intHandlerList[intType]))(); \ // eecute handler
|
|
|
|
|
|
|
|
} \
|
|
|
|
|
|
|
|
} while (0)
|
|
|
|
|
|
|
|
|
|
|
|
void timerReset(timerNo_t timer)
|
|
|
|
void timerReset(timerNo_t timer)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if(timerBus_No[timer]==1)
|
|
|
|
if(timerBus_No[timer]==1)
|
|
|
|