us_ticker_set_interrupt: fix bit-shift operation

pull/7172/head
Przemyslaw Stekiel 2018-06-19 08:55:35 +02:00
parent 80fabcb125
commit 02d7d25850
1 changed files with 1 additions and 1 deletions

View File

@ -110,7 +110,7 @@ void us_ticker_set_interrupt(timestamp_t timestamp)
{
core_util_critical_section_enter();
const uint32_t counter_mask = ((1 << US_TICKER_COUNTER_BITS) - 1);
const uint32_t counter_mask = ((1ULL << US_TICKER_COUNTER_BITS) - 1);
nrf_timer_cc_write(NRF_TIMER1, NRF_TIMER_CC_CHANNEL0, timestamp & counter_mask);