Commit 3c8c938d authored by Sandeep Mistry's avatar Sandeep Mistry

Fix warning

parent a629080f
...@@ -29,14 +29,14 @@ static volatile uint32_t overflows = 0; ...@@ -29,14 +29,14 @@ static volatile uint32_t overflows = 0;
uint32_t millis( void ) uint32_t millis( void )
{ {
uint64_t ticks = (uint64_t)(overflows << (uint64_t)32) | (uint64_t)nrf_rtc_counter_get(NRF_RTC1); uint64_t ticks = (uint64_t)((uint64_t)overflows << (uint64_t)32) | (uint64_t)nrf_rtc_counter_get(NRF_RTC1);
return (ticks * 1000) / RTC_INPUT_FREQ; return (ticks * 1000) / RTC_INPUT_FREQ;
} }
uint32_t micros( void ) uint32_t micros( void )
{ {
uint64_t ticks = (uint64_t)(overflows << (uint64_t)32) | (uint64_t)nrf_rtc_counter_get(NRF_RTC1); uint64_t ticks = (uint64_t)((uint64_t)overflows << (uint64_t)32) | (uint64_t)nrf_rtc_counter_get(NRF_RTC1);
return (ticks * 1000000) / RTC_INPUT_FREQ; return (ticks * 1000000) / RTC_INPUT_FREQ;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment