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.
SpecifiedTimeout.h@4:32fa20b74c9c, 2015-06-27 (annotated)
- Committer:
- ikrase
- Date:
- Sat Jun 27 07:54:12 2015 +0000
- Revision:
- 4:32fa20b74c9c
- Parent:
- 3:1d16a22386a8
- Child:
- 5:92fc8f455565
Work on specifiedtimeout
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| ikrase | 4:32fa20b74c9c | 1 | #ifndef SPECTIMEOUT_H |
| ikrase | 4:32fa20b74c9c | 2 | #define SPECTIMEOUT_H |
| ikrase | 4:32fa20b74c9c | 3 | |
| ikrase | 4:32fa20b74c9c | 4 | #include "mbed.h" |
| ikrase | 4:32fa20b74c9c | 5 | #include "FPointer.h" |
| ikrase | 4:32fa20b74c9c | 6 | //namespace mbed{ |
| ikrase | 4:32fa20b74c9c | 7 | |
| ikrase | 4:32fa20b74c9c | 8 | class SpecifiedTimeout : public Timeout { |
| ikrase | 4:32fa20b74c9c | 9 | |
| ikrase | 4:32fa20b74c9c | 10 | public: |
| ikrase | 4:32fa20b74c9c | 11 | uint32_t val; |
| ikrase | 4:32fa20b74c9c | 12 | void attach_us(uint32_t (*fptr)(uint32_t) , timestamp_t t, uint32_t val); |
| ikrase | 4:32fa20b74c9c | 13 | template<class T> |
| ikrase | 4:32fa20b74c9c | 14 | void attach_us(T* tptr, uint32_t(T::*mptr)(uint32_t) , timestamp_t t, uint32_t val); |
| ikrase | 4:32fa20b74c9c | 15 | protected: |
| ikrase | 4:32fa20b74c9c | 16 | virtual void handler(); |
| ikrase | 4:32fa20b74c9c | 17 | FPointer _function; |
| ikrase | 4:32fa20b74c9c | 18 | |
| ikrase | 4:32fa20b74c9c | 19 | private: |
| ikrase | 4:32fa20b74c9c | 20 | |
| ikrase | 4:32fa20b74c9c | 21 | |
| ikrase | 4:32fa20b74c9c | 22 | |
| ikrase | 4:32fa20b74c9c | 23 | |
| ikrase | 4:32fa20b74c9c | 24 | |
| ikrase | 4:32fa20b74c9c | 25 | |
| ikrase | 4:32fa20b74c9c | 26 | |
| ikrase | 4:32fa20b74c9c | 27 | }; |
| ikrase | 4:32fa20b74c9c | 28 | //namespace mbed{ |
| ikrase | 4:32fa20b74c9c | 29 | void SpecifiedTimeout::handler() { |
| ikrase | 4:32fa20b74c9c | 30 | _function.call(val); |
| ikrase | 4:32fa20b74c9c | 31 | } |
| ikrase | 4:32fa20b74c9c | 32 | |
| ikrase | 4:32fa20b74c9c | 33 | //} |
| ikrase | 4:32fa20b74c9c | 34 | |
| ikrase | 4:32fa20b74c9c | 35 | #endif |