Mark Gottscho / HardwareTimersLib

Fork of HardwareTimersLib by Mark Gottscho

Revision:
5:ea14fc749f44
Parent:
2:5056ec8c52e8
Child:
7:78f6ee57d324
--- a/Timer_TPM.cpp	Mon Mar 10 01:17:11 2014 +0000
+++ b/Timer_TPM.cpp	Mon Mar 10 19:10:42 2014 +0000
@@ -30,15 +30,15 @@
 }
 
 uint32_t Timer_TPM::getTick() {
-    if (!__valid)
-        return 0;
+    //if (!__valid)
+    //    return 0;
         
     //Get raw time
-    __disable_irq();
+    //__disable_irq();
     TPM0->CNT = 0; //Need to write to the TPM CNT register in order to read it (buffering)
     uint16_t tick = TPM0->CNT;
     uint32_t count = __count;
-    __enable_irq();
+    //__enable_irq();
     
     //Convert to ticks
     return (uint32_t) count * __rolloverValue + tick;