Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of HardwareTimersLib by
Diff: Timer_TPM.cpp
- Revision:
- 5:ea14fc749f44
- Parent:
- 2:5056ec8c52e8
- Child:
- 7:78f6ee57d324
diff -r 00f27dee70e9 -r ea14fc749f44 Timer_TPM.cpp
--- 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;
