mirror of https://github.com/ARMmbed/mbed-os.git
[Driver] Add API to support insertion of us_timestamp_t in TimerEvent.
parent
e119357822
commit
c90a3a007a
|
|
@ -44,6 +44,10 @@ void TimerEvent::insert(timestamp_t timestamp) {
|
|||
ticker_insert_event(_ticker_data, &event, timestamp, (uint32_t)this);
|
||||
}
|
||||
|
||||
void TimerEvent::insert_absolute(us_timestamp_t timestamp) {
|
||||
ticker_insert_event(_ticker_data, &event, timestamp, (uint32_t)this);
|
||||
}
|
||||
|
||||
void TimerEvent::remove() {
|
||||
ticker_remove_event(_ticker_data, &event);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,9 +44,12 @@ protected:
|
|||
// The handler called to service the timer event of the derived class
|
||||
virtual void handler() = 0;
|
||||
|
||||
// insert in to linked list
|
||||
// insert relative timestamp in to linked list
|
||||
void insert(timestamp_t timestamp);
|
||||
|
||||
// insert absolute timestamp into linked list
|
||||
void insert_absolute(us_timestamp_t timestamp);
|
||||
|
||||
// remove from linked list, if in it
|
||||
void remove();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue