add a cast for correctness.

pull/932/head
Rohit Grover 2015-03-16 14:05:44 +00:00
parent 35eb4b5250
commit c619bbbedf
1 changed files with 1 additions and 1 deletions

View File

@ -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