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.
Task.cpp@0:e381c3adaa04, 2011-01-14 (annotated)
- Committer:
- Phlaphead
- Date:
- Fri Jan 14 19:51:13 2011 +0000
- Revision:
- 0:e381c3adaa04
- Child:
- 1:e95b703c6ad7
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| Phlaphead | 0:e381c3adaa04 | 1 | |
| Phlaphead | 0:e381c3adaa04 | 2 | #include "Task.h" |
| Phlaphead | 0:e381c3adaa04 | 3 | |
| Phlaphead | 0:e381c3adaa04 | 4 | Task::Task() |
| Phlaphead | 0:e381c3adaa04 | 5 | { |
| Phlaphead | 0:e381c3adaa04 | 6 | interval = DEFAULT_INTERVAL; |
| Phlaphead | 0:e381c3adaa04 | 7 | } |
| Phlaphead | 0:e381c3adaa04 | 8 | |
| Phlaphead | 0:e381c3adaa04 | 9 | Task::Task(int _interval) |
| Phlaphead | 0:e381c3adaa04 | 10 | { |
| Phlaphead | 0:e381c3adaa04 | 11 | interval = _interval; |
| Phlaphead | 0:e381c3adaa04 | 12 | } |
| Phlaphead | 0:e381c3adaa04 | 13 | |
| Phlaphead | 0:e381c3adaa04 | 14 | void Task::start() |
| Phlaphead | 0:e381c3adaa04 | 15 | { |
| Phlaphead | 0:e381c3adaa04 | 16 | ticker.attach_us(this, &Task::preTick, interval); |
| Phlaphead | 0:e381c3adaa04 | 17 | } |
| Phlaphead | 0:e381c3adaa04 | 18 | |
| Phlaphead | 0:e381c3adaa04 | 19 | |
| Phlaphead | 0:e381c3adaa04 | 20 | void Task::preTick() |
| Phlaphead | 0:e381c3adaa04 | 21 | { |
| Phlaphead | 0:e381c3adaa04 | 22 | this->tick(); |
| Phlaphead | 0:e381c3adaa04 | 23 | } |