mbed
Fork of mbed-dev by
Diff: targets/TARGET_ONSEMI/TARGET_NCS36510/rtc.c
- Revision:
- 175:b96e65c34a4d
- Parent:
- 167:e84263d55307
--- a/targets/TARGET_ONSEMI/TARGET_NCS36510/rtc.c Fri Sep 15 14:59:18 2017 +0100 +++ b/targets/TARGET_ONSEMI/TARGET_NCS36510/rtc.c Mon Oct 02 15:33:19 2017 +0100 @@ -125,17 +125,6 @@ { uint64_t current_time = fRtcRead(); - /* compute delta between current time and timestamp. - * Note: the current time used to compute the delta is relative (truncated - * to 32 bits). - */ - int32_t delta = timestamp - (uint32_t) current_time; - if (delta <= 0) { - // event considered in the past, set the interrupt as pending. - NVIC_SetPendingIRQ(Rtc_IRQn); - return; - } - uint64_t full_timestamp = (current_time & ~UINT32_MAX) | timestamp; if ( (uint32_t)current_time > timestamp) { full_timestamp += ((uint64_t) UINT32_MAX) + 1;