Functions | |
void | ticker_set_handler (const ticker_data_t *const ticker, ticker_event_handler handler) |
Initialize a ticker and set the event handler. More... | |
void | ticker_irq_handler (const ticker_data_t *const ticker) |
IRQ handler that goes through the events to trigger overdue events. More... | |
void | ticker_remove_event (const ticker_data_t *const ticker, ticker_event_t *obj) |
Remove an event from the queue. More... | |
void | ticker_insert_event (const ticker_data_t *const ticker, ticker_event_t *obj, timestamp_t timestamp, uint32_t id) |
Insert an event to the queue. More... | |
void | ticker_insert_event_us (const ticker_data_t *const ticker, ticker_event_t *obj, us_timestamp_t timestamp, uint32_t id) |
Insert an event to the queue. More... | |
timestamp_t | ticker_read (const ticker_data_t *const ticker) |
Read the current (relative) ticker's timestamp. More... | |
us_timestamp_t | ticker_read_us (const ticker_data_t *const ticker) |
Read the current (absolute) ticker's timestamp. More... | |
int | ticker_get_next_timestamp (const ticker_data_t *const ticker, timestamp_t *timestamp) |
Read the next event's timestamp. More... | |
void | ticker_suspend (const ticker_data_t *const ticker) |
Suspend this ticker. More... | |
void | ticker_resume (const ticker_data_t *const ticker) |
Resume this ticker. More... | |
int ticker_get_next_timestamp | ( | const ticker_data_t *const | ticker, |
timestamp_t * | timestamp | ||
) |
Read the next event's timestamp.
ticker | The ticker object. |
timestamp | The timestamp object. |
void ticker_insert_event | ( | const ticker_data_t *const | ticker, |
ticker_event_t * | obj, | ||
timestamp_t | timestamp, | ||
uint32_t | id | ||
) |
Insert an event to the queue.
The event will be executed in timestamp - ticker_read().
ticker | The ticker object. |
obj | The event object to be inserted to the queue |
timestamp | The event's timestamp |
id | The event object |
void ticker_insert_event_us | ( | const ticker_data_t *const | ticker, |
ticker_event_t * | obj, | ||
us_timestamp_t | timestamp, | ||
uint32_t | id | ||
) |
Insert an event to the queue.
The event will be executed in timestamp - ticker_read_us() us.
ticker | The ticker object. |
obj | The event object to be inserted to the queue |
timestamp | The event's timestamp |
id | The event object |
void ticker_irq_handler | ( | const ticker_data_t *const | ticker | ) |
IRQ handler that goes through the events to trigger overdue events.
ticker | The ticker object. |
timestamp_t ticker_read | ( | const ticker_data_t *const | ticker | ) |
Read the current (relative) ticker's timestamp.
ticker | The ticker object. |
us_timestamp_t ticker_read_us | ( | const ticker_data_t *const | ticker | ) |
Read the current (absolute) ticker's timestamp.
ticker | The ticker object. |
void ticker_remove_event | ( | const ticker_data_t *const | ticker, |
ticker_event_t * | obj | ||
) |
Remove an event from the queue.
ticker | The ticker object. |
obj | The event object to be removed from the queue |
void ticker_resume | ( | const ticker_data_t *const | ticker | ) |
Resume this ticker.
When resumed the ticker will ignore any time that has passed and continue counting up where it left off.
ticker | The ticker object. |
void ticker_set_handler | ( | const ticker_data_t *const | ticker, |
ticker_event_handler | handler | ||
) |
Initialize a ticker and set the event handler.
ticker | The ticker object. |
handler | A handler to be set |
void ticker_suspend | ( | const ticker_data_t *const | ticker | ) |
Suspend this ticker.
When suspended reads will always return the same time and no events will be dispatched. When suspended the common layer will only ever call the interface function clear_interrupt() and that is only if ticker_irq_handler is called.
ticker | The ticker object. |