drivers: timer: nrf: drop unnecessary counter mask
The RTC COUNTER register doesn't care that it receives a value larger than it can hold; it'll discard the bits internally. No need to spend cycles doing it manually. Signed-off-by: Peter A. Bigot <pab@pabigot.com>
This commit is contained in:
parent
4b24e88fa4
commit
71882ff8c4
1 changed files with 1 additions and 1 deletions
|
@ -31,7 +31,7 @@ static u32_t counter_sub(u32_t a, u32_t b)
|
|||
|
||||
static void set_comparator(u32_t cyc)
|
||||
{
|
||||
nrf_rtc_cc_set(RTC, 0, cyc & COUNTER_MAX);
|
||||
nrf_rtc_cc_set(RTC, 0, cyc);
|
||||
}
|
||||
|
||||
static u32_t counter(void)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue