1 //-----------------------------------------------------------------------------
2 // Jonathan Westhues, Aug 2005
5 // This code is licensed to you under the terms of the GNU GPL, version 2 or,
6 // at your option, any later version. See the LICENSE.txt file for the text of
8 //-----------------------------------------------------------------------------
9 // Timers, Clocks functions used in LF or Legic where you would need detailed time.
10 //-----------------------------------------------------------------------------
18 #define GET_TICKS GetTicks()
21 void SpinDelay(int ms
);
22 void SpinDelayUs(int us
);
23 void SpinDelayUsPrecision(int us
); // precision 0.6us , running for 43ms before
25 void StartTickCount(void);
26 uint32_t RAMFUNC
GetTickCount(void);
27 uint32_t RAMFUNC
GetTickCountDelta(uint32_t start_ticks
);
29 void StartCountUS(void);
30 uint32_t RAMFUNC
GetCountUS(void);
31 void ResetUSClock(void);
32 void SpinDelayCountUs(uint32_t us
);
34 void StartCountSspClk(void);
35 void ResetSspClk(void);
36 uint32_t RAMFUNC
GetCountSspClk(void);
37 uint32_t RAMFUNC
GetCountSspClkDelta(uint32_t start
);
39 void StartTicks(void);
40 uint32_t GetTicks(void);
41 void WaitTicks(uint32_t ticks
);
42 void WaitUS(uint32_t us
);
43 void WaitMS(uint32_t ms
);