]>
cvs.zerfleddert.de Git - proxmark3-svn/blob - armsrc/ticks.h
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 //-----------------------------------------------------------------------------
19 #include "proxmark3.h"
22 # define GET_TICKS AT91C_BASE_TC0->TC_CV
25 void SpinDelay(int ms
);
26 void SpinDelayUs(int us
);
28 void StartTickCount(void);
29 uint32_t RAMFUNC
GetTickCount(void);
31 void StartCountUS(void);
32 uint32_t RAMFUNC
GetCountUS(void);
33 void ResetUSClock(void);
34 void SpinDelayCountUs(uint32_t us
);
35 //uint32_t RAMFUNC GetDeltaCountUS(void);
37 void StartCountSspClk();
38 void ResetSspClk(void);
39 uint32_t RAMFUNC
GetCountSspClk();
41 extern void StartTicks(void);
42 extern void WaitTicks(uint32_t ticks
);
43 extern void WaitUS(uint16_t us
);
44 extern void WaitMS(uint16_t ms
);
45 extern void ResetTicks();
46 extern void ResetTimer(AT91PS_TC timer
);