recover_pk.py: replace secp192r1 by prime192v1
[RRG-proxmark3.git] / common_arm / ticks.h
blob67d8dceede51b3b39a6347cd272b6fc4a10c20da
1 //-----------------------------------------------------------------------------
2 // Copyright (C) Jonathan Westhues, Aug 2005
3 // Copyright (C) Proxmark3 contributors. See AUTHORS.md for details.
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // See LICENSE.txt for the text of the license.
16 //-----------------------------------------------------------------------------
17 // Timers, Clocks functions used in LF or Legic where you would need detailed time.
18 //-----------------------------------------------------------------------------
20 #ifndef __TICKS_H
21 #define __TICKS_H
23 #include "common.h"
25 #ifndef GET_TICKS
26 #define GET_TICKS GetTicks()
27 #endif
29 void StartTicks(void);
30 uint32_t GetTicks(void);
31 uint32_t RAMFUNC GetTicksDelta(uint32_t start);
32 void WaitUS(uint32_t us);
33 void WaitTicks(uint32_t ticks);
34 void StartCountUS(void);
35 uint32_t RAMFUNC GetCountUS(void);
36 void StopTicks(void);
39 #ifndef AS_BOOTROM //////////////////////////////////////////////////////////////
40 // Bootrom does not require these functions.
41 // Wrap in #ifndef to avoid accidental bloat of bootrom
43 void SpinDelay(int ms);
44 void SpinDelayUs(int us);
45 void SpinDelayUsPrecision(int us); // precision 0.6us , running for 43ms before
47 void StartTickCount(void);
48 uint32_t RAMFUNC GetTickCount(void);
49 uint32_t RAMFUNC GetTickCountDelta(uint32_t start_ticks);
51 void ResetUSClock(void);
52 void SpinDelayCountUs(uint32_t us);
54 void StartCountSspClk(void);
55 void ResetSspClk(void);
56 uint32_t RAMFUNC GetCountSspClk(void);
57 uint32_t RAMFUNC GetCountSspClkDelta(uint32_t start);
59 void WaitMS(uint32_t ms);
61 #endif // #ifndef AS_BOOTROM
65 #endif