34 #ifdef __BUILD_WITH_EXAMPLE__
35 #include "lpc17xx_libcfg.h"
44 static uint32_t getPClock (uint32_t timernum);
45 static uint32_t converUSecToVal (uint32_t timernum, uint32_t usec);
54 static uint32_t getPClock (uint32_t timernum)
56 uint32_t clkdlycnt = 0;
85 uint32_t converUSecToVal (uint32_t timernum, uint32_t usec)
90 clkdlycnt = (uint64_t) getPClock(timernum);
92 clkdlycnt = (clkdlycnt * usec) / 1000000;
93 return (uint32_t) clkdlycnt;
191 temp = (TIMx->
IR) & (1<<(4+IntFlag));
239 TIMx->
IR |= (1<<(4+IntFlag));
327 TIMx->
TCR &= ~(1<<1);
337 TIMx->
PR = converUSecToVal (converPtrToTimeNum(TIMx),pTimeCfg->
PrescaleValue)-1;
350 TIMx->
IR = 0xFFFFFFFF;
511 TIMx->
MR0 = MatchValue;
514 TIMx->
MR1 = MatchValue;
517 TIMx->
MR2 = MatchValue;
520 TIMx->
MR3 = MatchValue;
575 if(CaptureChannel==0)