From c619bbbedf2fb56c7b6d28d6d358165d91c620be Mon Sep 17 00:00:00 2001 From: Rohit Grover Date: Mon, 16 Mar 2015 14:05:44 +0000 Subject: [PATCH] add a cast for correctness. --- .../targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/us_ticker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 a2ec80d180..5c76f0dbfb 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 @@ -234,7 +234,7 @@ void us_ticker_set_interrupt(timestamp_t timestamp) * microsecond units (in 64-bits). */ const uint64_t currentTime64 = RTC_UNITS_TO_MICROSECONDS(rtc1_getCounter64()); - const uint64_t timestamp64 = currentTime64 + (timestamp - (timestamp_t)currentTime64); + const uint64_t timestamp64 = currentTime64 + (timestamp_t)(timestamp - (timestamp_t)currentTime64); uint32_t newCallbackTime = MICROSECONDS_TO_RTC_UNITS(timestamp64); /* Check for repeat setup of an existing callback. This is actually not