mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
0. its alpha version!!!
1. commands changed from "hf 14a" to "hf mf" 2. some code cleaning and small bugfixes 3. alpha version hf mf sim 4. added internal function GetTickCount() for time measuring
This commit is contained in:
parent
873014de8a
commit
9ca155ba44
14 changed files with 977 additions and 551 deletions
|
@ -235,3 +235,30 @@ void FormatVersionInformation(char *dst, int len, const char *prefix, void *vers
|
|||
strncat(dst, " ", len);
|
||||
strncat(dst, v->buildtime, len);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// timer lib
|
||||
// -------------------------------------------------------------------------
|
||||
// test procedure:
|
||||
//
|
||||
// ti = GetTickCount();
|
||||
// SpinDelay(1000);
|
||||
// ti = GetTickCount() - ti;
|
||||
// Dbprintf("timer(1s): %d t=%d", ti, GetTickCount());
|
||||
|
||||
void StartTickCount()
|
||||
{
|
||||
// must be 0x40, but on my cpu - included divider is optimal
|
||||
// 0x20 - 1 ms / bit
|
||||
// 0x40 - 2 ms / bit
|
||||
|
||||
AT91C_BASE_RTTC->RTTC_RTMR = AT91C_RTTC_RTTRST + 0x003B;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the current count.
|
||||
*/
|
||||
uint32_t RAMFUNC GetTickCount(){
|
||||
return AT91C_BASE_RTTC->RTTC_RTVR * 2;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue