mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 18:48:13 -07:00
rework usart RX timings
This commit is contained in:
parent
794d109f30
commit
e0c9e2b0d1
4 changed files with 70 additions and 14 deletions
|
@ -62,6 +62,13 @@ uint32_t RAMFUNC GetTickCount(void) {
|
|||
return AT91C_BASE_RTTC->RTTC_RTVR;// was * 2;
|
||||
}
|
||||
|
||||
uint32_t RAMFUNC GetTickCountDelta(uint32_t start_ticks) {
|
||||
uint32_t stop_ticks = AT91C_BASE_RTTC->RTTC_RTVR;
|
||||
if (stop_ticks > start_ticks)
|
||||
return stop_ticks - start_ticks;
|
||||
return (UINT32_MAX - start_ticks) + stop_ticks;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// microseconds timer
|
||||
// -------------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue