Timer peripheral class. This lib. include function ; WAIT, stop, reset, start, and read_ms.
Dependents: DetectFreqAboveTH RN41
myTimer.h@2:3060a6604f13, 2015-10-06 (annotated)
- Committer:
- AkinoriHashimoto
- Date:
- Tue Oct 06 06:53:16 2015 +0000
- Revision:
- 2:3060a6604f13
- Parent:
- 1:685c0f37a569
- Child:
- 5:c9304777ce1a
start() adj.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
AkinoriHashimoto | 0:04c9087b9ca9 | 1 | #pragma once |
AkinoriHashimoto | 0:04c9087b9ca9 | 2 | |
AkinoriHashimoto | 0:04c9087b9ca9 | 3 | #include "mbed.h" |
AkinoriHashimoto | 0:04c9087b9ca9 | 4 | |
AkinoriHashimoto | 0:04c9087b9ca9 | 5 | /** Timer Class. |
AkinoriHashimoto | 0:04c9087b9ca9 | 6 | * |
AkinoriHashimoto | 0:04c9087b9ca9 | 7 | * stop, reset, start, read_ms. |
AkinoriHashimoto | 0:04c9087b9ca9 | 8 | */ |
AkinoriHashimoto | 0:04c9087b9ca9 | 9 | class myTimer |
AkinoriHashimoto | 0:04c9087b9ca9 | 10 | { |
AkinoriHashimoto | 0:04c9087b9ca9 | 11 | private: |
AkinoriHashimoto | 0:04c9087b9ca9 | 12 | Timer timer; |
AkinoriHashimoto | 0:04c9087b9ca9 | 13 | |
AkinoriHashimoto | 0:04c9087b9ca9 | 14 | public: |
AkinoriHashimoto | 0:04c9087b9ca9 | 15 | myTimer(); |
AkinoriHashimoto | 0:04c9087b9ca9 | 16 | void stop(); |
AkinoriHashimoto | 0:04c9087b9ca9 | 17 | void reset(); |
AkinoriHashimoto | 2:3060a6604f13 | 18 | void start(bool _RESET=false); |
AkinoriHashimoto | 1:685c0f37a569 | 19 | int read_ms(bool _START=true, bool _RESET=true, bool _STOP=true); |
AkinoriHashimoto | 1:685c0f37a569 | 20 | void wait_ms(int waitTime, bool _START=true, bool _RESET=true, bool _STOP=true); |
AkinoriHashimoto | 0:04c9087b9ca9 | 21 | }; |
AkinoriHashimoto | 0:04c9087b9ca9 | 22 | |
AkinoriHashimoto | 0:04c9087b9ca9 | 23 | // EOF |