mbed
Fork of mbed-dev by
Diff: targets/TARGET_NORDIC/TARGET_NRF5/lp_ticker.c
- Revision:
- 175:b96e65c34a4d
- Parent:
- 149:156823d33999
--- a/targets/TARGET_NORDIC/TARGET_NRF5/lp_ticker.c Fri Sep 15 14:59:18 2017 +0100 +++ b/targets/TARGET_NORDIC/TARGET_NRF5/lp_ticker.c Mon Oct 02 15:33:19 2017 +0100 @@ -35,6 +35,14 @@ LP_TICKER_CC_CHANNEL, LP_TICKER_INT_MASK); } +void lp_ticker_fire_interrupt(void) +{ + uint32_t closest_safe_compare = common_rtc_32bit_ticks_get() + 2; + + nrf_rtc_cc_set(COMMON_RTC_INSTANCE, LP_TICKER_CC_CHANNEL, RTC_WRAP(closest_safe_compare)); + nrf_rtc_event_enable(COMMON_RTC_INSTANCE, LP_TICKER_INT_MASK); +} + void lp_ticker_disable_interrupt(void) { nrf_rtc_event_disable(COMMON_RTC_INSTANCE, LP_TICKER_INT_MASK);