123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- #ifndef MBED_TIMEREVENT_H
- #define MBED_TIMEREVENT_H
- #include "hal/ticker_api.h"
- #include "hal/us_ticker_api.h"
- #include "platform/NonCopyable.h"
- namespace mbed {
- class TimerEvent : private NonCopyable<TimerEvent> {
- public:
- TimerEvent();
- TimerEvent(const ticker_data_t *data);
-
- static void irq(uint32_t id);
-
- virtual ~TimerEvent();
- protected:
-
- virtual void handler() = 0;
-
- void insert(timestamp_t timestamp);
-
- void insert_absolute(us_timestamp_t timestamp);
-
- void remove();
- ticker_event_t event;
- const ticker_data_t *_ticker_data;
- };
- }
- #endif
|