You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "pkarashchenko (via GitHub)" <gi...@apache.org> on 2023/09/28 18:59:22 UTC
[GitHub] [nuttx] pkarashchenko commented on a diff in pull request #10830: arch/nrf{52|53|91}: fixes for timer
pkarashchenko commented on code in PR #10830:
URL: https://github.com/apache/nuttx/pull/10830#discussion_r1340558459
##########
arch/arm/src/nrf52/nrf52_tim_lowerhalf.c:
##########
@@ -361,13 +361,13 @@ static int nrf52_timer_settimeout(struct timer_lowerhalf_s *lower,
goto errout;
}
- if (timeout > NRF52_TIMER_MAX)
+ cc = (timeout * NRF52_TIMER_PER / 1000000);
Review Comment:
Shouldn't this be `if (timeout > NRF52_TIMER_MAX * 1000000 / NRF52_TIMER_PER)`? And calculate `cc` only in case of `false`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org