diff --git a/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/us_ticker.c b/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/us_ticker.c index 4acb6b51b8..e8435afe42 100644 --- a/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/us_ticker.c +++ b/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/us_ticker.c @@ -168,6 +168,19 @@ uint32_t us_ticker_read() return RTC_UNITS_TO_MICROSECONDS(rtc1_getCounter()); } +/** + * Setup the us_ticker callback interrupt to go at the given timestamp. + * + * @Note: only one callback is pending at any time. + * + * @Note: If a callback is pending, and this function is called again, the new + * callback-time overrides any existing callback setting. It is the caller's + * responsibility to ensure that this function is called to setup a callback for + * the earliest timeout. + * + * @Note: If this function is used to setup an interrupt for 'right-now' or a + * time in the past, then the callback is invoked right-away. + */ void us_ticker_set_interrupt(timestamp_t timestamp) { if (!us_ticker_inited) {