]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
ADD: added a StopTicks functions, to disable the timer used for ticks (TC0, TC1)
authoriceman1001 <iceman@iuse.se>
Thu, 6 Oct 2016 22:13:09 +0000 (00:13 +0200)
committericeman1001 <iceman@iuse.se>
Thu, 6 Oct 2016 22:13:09 +0000 (00:13 +0200)
armsrc/ticks.c
armsrc/ticks.h

index 633e963a6b8e555b0332285051147d92f175d26d..44249879e31210f7aef81c0e85098ab213d6fe2b 100644 (file)
@@ -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;       
+}
index 1b05289df90591fb2d098b0fbc4db45064602972..8ad4bc679ad4bf516b56ff00b45c93c4ea0d24a7 100644 (file)
@@ -44,4 +44,5 @@ extern void WaitUS(uint16_t us);
 extern void WaitMS(uint16_t ms);
 extern void ResetTicks();
 extern void ResetTimer(AT91PS_TC timer);
+extern void StopTicks(void);
 #endif
\ No newline at end of file
Impressum, Datenschutz