drivers: timer: nrf_rtc_timer: Fix comparison in z_nrf_rtc_timer_get_ticks
Test was failing due to wrong type conversion. Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
parent
b417f68609
commit
702f574dfd
1 changed files with 2 additions and 1 deletions
|
@ -141,8 +141,9 @@ int z_nrf_rtc_timer_get_ticks(k_timeout_t t)
|
|||
|
||||
/* absolute timeout */
|
||||
result = abs_ticks - curr_tick;
|
||||
|
||||
if ((result > COUNTER_HALF_SPAN) ||
|
||||
(result < -COUNTER_HALF_SPAN)) {
|
||||
(result < -(int64_t)COUNTER_HALF_SPAN)) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue