Initial commit
Dependencies: MODSERIAL Terminal TextLCD mbed
mytimer.h@1:a6b0e0ce3e7a, 2014-12-05 (annotated)
- Committer:
- anmar
- Date:
- Fri Dec 05 10:27:17 2014 +0000
- Revision:
- 1:a6b0e0ce3e7a
- Parent:
- 0:0903545c0460
Initial commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
anmar | 0:0903545c0460 | 1 | #include "mbed.h" |
anmar | 0:0903545c0460 | 2 | |
anmar | 0:0903545c0460 | 3 | #ifndef _mytimer_h |
anmar | 0:0903545c0460 | 4 | #define _mytimer_h |
anmar | 0:0903545c0460 | 5 | |
anmar | 0:0903545c0460 | 6 | class mytimer |
anmar | 0:0903545c0460 | 7 | { |
anmar | 0:0903545c0460 | 8 | public: |
anmar | 0:0903545c0460 | 9 | mytimer(); |
anmar | 0:0903545c0460 | 10 | |
anmar | 0:0903545c0460 | 11 | void reset(); |
anmar | 0:0903545c0460 | 12 | uint32_t read(); |
anmar | 0:0903545c0460 | 13 | void start(); |
anmar | 0:0903545c0460 | 14 | void stop(); |
anmar | 0:0903545c0460 | 15 | |
anmar | 0:0903545c0460 | 16 | |
anmar | 0:0903545c0460 | 17 | private: |
anmar | 0:0903545c0460 | 18 | void update(); |
anmar | 0:0903545c0460 | 19 | |
anmar | 0:0903545c0460 | 20 | Ticker *tick; |
anmar | 0:0903545c0460 | 21 | |
anmar | 0:0903545c0460 | 22 | uint32_t timer; |
anmar | 0:0903545c0460 | 23 | uint8_t running; |
anmar | 0:0903545c0460 | 24 | }; |
anmar | 0:0903545c0460 | 25 | |
anmar | 0:0903545c0460 | 26 | |
anmar | 0:0903545c0460 | 27 | #endif |