mbed libraries for KL25Z
TimerEvent.h
- Committer:
- emilmont
- Date:
- 2012-11-09
- Revision:
- 8:c14af7958ef5
- Parent:
- 2:e9a661555b58
- Child:
- 9:663789d7729f
File content as of revision 8:c14af7958ef5:
/* mbed Microcontroller Library - TimerEvent * Copyright (c) 2007-2009 ARM Limited. All rights reserved. */ #ifndef MBED_TIMEREVENT_H #define MBED_TIMEREVENT_H #include "us_ticker_api.h" namespace mbed { /** Base abstraction for timer interrupts */ class TimerEvent { public: TimerEvent(); /** The handler registered with the underlying timer interrupt */ static void irq(uint32_t id); /** Destruction removes it... */ virtual ~TimerEvent(); protected: // The handler called to service the timer event of the derived class virtual void handler() = 0; // insert in to linked list void insert(unsigned int timestamp); // remove from linked list, if in it void remove(); ticker_event event; }; } // namespace mbed #endif