resolving makro errors

master
polymurph 2 years ago
parent 23b2750e18
commit 9bc587c0f2

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

Loading…
Cancel
Save