mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 18:48:13 -07:00
ADD: added a StopTicks functions, to disable the timer used for ticks (TC0, TC1)
This commit is contained in:
parent
5a08545794
commit
d41efbf21b
2 changed files with 7 additions and 1 deletions
|
@ -217,7 +217,7 @@ void WaitMS(uint16_t ms){
|
|||
WaitTicks( (uint32_t)(ms * 1500) );
|
||||
}
|
||||
// Starts Clock and waits until its reset
|
||||
void ResetTicks(){
|
||||
void ResetTicks(void){
|
||||
AT91C_BASE_TC0->TC_CCR = AT91C_TC_CLKEN | AT91C_TC_SWTRG;
|
||||
AT91C_BASE_TC1->TC_CCR = AT91C_TC_CLKEN | AT91C_TC_SWTRG;
|
||||
while (AT91C_BASE_TC1->TC_CV >= 1);
|
||||
|
@ -226,3 +226,8 @@ void ResetTimer(AT91PS_TC timer){
|
|||
timer->TC_CCR = AT91C_TC_CLKEN | AT91C_TC_SWTRG;
|
||||
while(timer->TC_CV >= 1) ;
|
||||
}
|
||||
// stop clock
|
||||
void StopTicks(void){
|
||||
AT91C_BASE_TC0->TC_CCR = AT91C_TC_CLKDIS;
|
||||
AT91C_BASE_TC1->TC_CCR = AT91C_TC_CLKDIS;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue