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
HardwareTimer.cpp@0:47acc8320421, 2014-03-08 (annotated)
- Committer:
- mgottscho
- Date:
- Sat Mar 08 20:31:49 2014 +0000
- Revision:
- 0:47acc8320421
- Child:
- 2:5056ec8c52e8
Fixes
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mgottscho | 0:47acc8320421 | 1 | /* HardwareTimer.cpp |
mgottscho | 0:47acc8320421 | 2 | * Tested with mbed board: FRDM-KL46Z |
mgottscho | 0:47acc8320421 | 3 | * Author: Mark Gottscho |
mgottscho | 0:47acc8320421 | 4 | * mgottscho@ucla.edu |
mgottscho | 0:47acc8320421 | 5 | */ |
mgottscho | 0:47acc8320421 | 6 | |
mgottscho | 0:47acc8320421 | 7 | #include "mbed.h" |
mgottscho | 0:47acc8320421 | 8 | #include "HardwareTimer.h" |
mgottscho | 0:47acc8320421 | 9 | |
mgottscho | 0:47acc8320421 | 10 | HardwareTimer::HardwareTimer(uint32_t tickValue) : |
mgottscho | 0:47acc8320421 | 11 | __valid(false), |
mgottscho | 0:47acc8320421 | 12 | __enabled(false), |
mgottscho | 0:47acc8320421 | 13 | __tickValue(tickValue) |
mgottscho | 0:47acc8320421 | 14 | { |
mgottscho | 0:47acc8320421 | 15 | } |
mgottscho | 0:47acc8320421 | 16 | |
mgottscho | 0:47acc8320421 | 17 | HardwareTimer::~HardwareTimer() { } |
mgottscho | 0:47acc8320421 | 18 | |
mgottscho | 0:47acc8320421 | 19 | bool HardwareTimer::valid() { |
mgottscho | 0:47acc8320421 | 20 | return __valid; |
mgottscho | 0:47acc8320421 | 21 | } |
mgottscho | 0:47acc8320421 | 22 | |
mgottscho | 0:47acc8320421 | 23 | bool HardwareTimer::isEnabled() { |
mgottscho | 0:47acc8320421 | 24 | return __enabled; |
mgottscho | 0:47acc8320421 | 25 | } |
mgottscho | 0:47acc8320421 | 26 | |
mgottscho | 0:47acc8320421 | 27 | float HardwareTimer::tickValue() { |
mgottscho | 0:47acc8320421 | 28 | return __tickValue; |
mgottscho | 0:47acc8320421 | 29 | } |