]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - armsrc/ticks.c
chg: trying to configure MAC OS as a builing environment for Travis CI
[proxmark3-svn] / armsrc / ticks.c
index 0117030eab5b54c04cf9fcbe7d3a19b76bea2c41..44249879e31210f7aef81c0e85098ab213d6fe2b 100644 (file)
@@ -187,7 +187,7 @@ void StartTicks(void){
                                                                AT91C_TC_WAVE | AT91C_TC_WAVESEL_UP_AUTO | AT91C_TC_ACPA_CLEAR |
                                                                AT91C_TC_ACPC_SET | AT91C_TC_ASWTRG_SET;
        AT91C_BASE_TC0->TC_RA = 1;
-       AT91C_BASE_TC0->TC_RC = 0xBFFF + 1; // 0xC000
+       AT91C_BASE_TC0->TC_RC = 0
 
        AT91C_BASE_TC1->TC_CCR = AT91C_TC_CLKDIS;       // timer disable  
        AT91C_BASE_TC1->TC_CMR = AT91C_TC_CLKS_XC1; // from TC0
@@ -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;       
+}
Impressum, Datenschutz