From b7cd6b6ae8558f1b6c05169dff0a700878a7aef9 Mon Sep 17 00:00:00 2001 From: Rohit Grover Date: Wed, 25 Feb 2015 12:13:32 +0000 Subject: [PATCH] add a comment block for us_ticker_set_interrupt() --- .../TARGET_NORDIC/TARGET_MCU_NRF51822/us_ticker.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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) {