mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-12 18:25:07 +08:00
ssp clock delta
This commit is contained in:
parent
df2c294cac
commit
ff66ea896b
2 changed files with 8 additions and 0 deletions
|
@ -185,6 +185,13 @@ uint32_t RAMFUNC GetCountSspClk(void) {
|
|||
return tmp_count;
|
||||
}
|
||||
|
||||
uint32_t RAMFUNC GetCountSspClkDelta(uint32_t start) {
|
||||
uint32_t stop = GetCountSspClk();
|
||||
if ( stop >= start )
|
||||
return stop - start;
|
||||
return (UINT32_MAX - start) + stop;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Timer for bitbanging, or LF stuff when you need a very precis timer
|
||||
// 1us = 1.5ticks
|
||||
|
|
|
@ -33,6 +33,7 @@ void SpinDelayCountUs(uint32_t us);
|
|||
void StartCountSspClk();
|
||||
void ResetSspClk(void);
|
||||
uint32_t RAMFUNC GetCountSspClk();
|
||||
uint32_t RAMFUNC GetCountSspClkDelta();
|
||||
|
||||
void StartTicks(void);
|
||||
uint32_t GetTicks(void);
|
||||
|
|
Loading…
Reference in a new issue