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.
Dependents: DetectFreqAboveTH RN41
myTimer.h@6:4cb4eea64805, 2017-09-29 (annotated)
- Committer:
- AkinoriHashimoto
- Date:
- Fri Sep 29 06:46:31 2017 +0000
- Revision:
- 6:4cb4eea64805
- Parent:
- 5:c9304777ce1a
- Child:
- 7:8fbe0cf9d582
Timer peripheral class.; ; this lib. include function; WAIT, stop, reset, start, and read.
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 | 5:c9304777ce1a | 20 | int read_us(bool _START=true, bool _RESET=true, bool _STOP=true); |
AkinoriHashimoto | 1:685c0f37a569 | 21 | void wait_ms(int waitTime, bool _START=true, bool _RESET=true, bool _STOP=true); |
AkinoriHashimoto | 6:4cb4eea64805 | 22 | void wait_u(int waitTime, bool _START=true, bool _RESET=true, bool _STOP=true); |
AkinoriHashimoto | 0:04c9087b9ca9 | 23 | }; |
AkinoriHashimoto | 0:04c9087b9ca9 | 24 | |
AkinoriHashimoto | 0:04c9087b9ca9 | 25 | // EOF |