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.
Diff: lib_ClockCounter.cpp
- Revision:
- 3:20dd01b1a1fd
- Parent:
- 1:bdbac277828a
- Child:
- 4:b873a2fda102
--- a/lib_ClockCounter.cpp Thu Nov 21 09:25:58 2019 +0000 +++ b/lib_ClockCounter.cpp Tue Jan 07 14:55:10 2020 +0000 @@ -45,12 +45,12 @@ } } -int ClockCounter::getCount(float period) +int ClockCounter::getCount(int period) { // TCR => Timer Control Register LPC_TIM2->TCR = 0x2; // Bits(1,0) 10 => Timer2 count reset LPC_TIM2->TCR = 0x1; // Bits(1,0) 01 => Timer2 enabled - wait(period); + wait_us(period); LPC_TIM2->TCR = 0x0; // Bits(1,0) 00 => Timer2 disabled return LPC_TIM2->TC; // TC => Timer Counter } \ No newline at end of file