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.
Fork of mbed by
Diff: TimerEvent.h
- Revision:
- 43:e2ed12d17f06
- Parent:
- 27:7110ebee3484
- Child:
- 44:24d45a770a51
--- a/TimerEvent.h Wed Aug 29 12:44:47 2012 +0100 +++ b/TimerEvent.h Fri Oct 26 17:40:46 2012 +0100 @@ -7,36 +7,51 @@ namespace mbed { -// Base abstraction for timer interrupts +/** Base abstraction for timer interrupts +*/ class TimerEvent { public: TimerEvent(); - // The handler registered with the underlying timer interrupt + /** The handler registered with the underlying timer interrupt + */ static void irq(); - // Destruction removes it... + /** Destruction removes it... + */ virtual ~TimerEvent(); protected: - // The handler called to service the timer event of the derived class + /** The handler called to service the timer event of the derived class + */ virtual void handler() = 0; - // insert in to linked list + /** Insert in to linked list + */ void insert(unsigned int timestamp); - // remove from linked list, if in it + /** Remove from linked list, if in it + */ void remove(); - // Get the current usec timestamp + /** Get the current usec timestamp + */ static unsigned int timestamp(); - static TimerEvent *_head; // The head of the list of the events, NULL if none - TimerEvent *_next; // Pointer to the next in the list, NULL if last - unsigned int _timestamp; // The timestamp at which the even should be triggered + /** The head of the list of the events, NULL if none + */ + static TimerEvent *_head; + + /** Pointer to the next in the list, NULL if last + */ + TimerEvent *_next; + + /** The timestamp at which the even should be triggered + */ + unsigned int _timestamp; };