Skip to content

Commit 7020c50

Browse files
committed
Added function to get the timestamp of the next us_ticker event.
1 parent 1b2a621 commit 7020c50

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

libraries/mbed/common/us_ticker_api.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,7 @@ void us_ticker_remove_event(ticker_event_t *obj) {
116116

117117
__enable_irq();
118118
}
119+
120+
timestamp_t us_ticker_get_next_timestamp(void) {
121+
return head->timestamp;
122+
}

libraries/mbed/hal/us_ticker_api.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ void us_ticker_irq_handler(void);
4343

4444
void us_ticker_insert_event(ticker_event_t *obj, timestamp_t timestamp, uint32_t id);
4545
void us_ticker_remove_event(ticker_event_t *obj);
46+
timestamp_t us_ticker_get_next_timestamp(void);
4647

4748
#ifdef __cplusplus
4849
}

0 commit comments

Comments
 (0)