mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
armv7-a/r: correct maxdelay calculating
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
@@ -150,7 +150,7 @@ static int arm_timer_maxdelay(struct oneshot_lowerhalf_s *lower_,
|
|||||||
struct arm_timer_lowerhalf_s *lower =
|
struct arm_timer_lowerhalf_s *lower =
|
||||||
(struct arm_timer_lowerhalf_s *)lower_;
|
(struct arm_timer_lowerhalf_s *)lower_;
|
||||||
|
|
||||||
uint64_t maxnsec = nsec_from_count(UINT32_MAX, lower->freq);
|
uint64_t maxnsec = nsec_from_count(UINT64_MAX, lower->freq);
|
||||||
|
|
||||||
ts->tv_sec = maxnsec / NSEC_PER_SEC;
|
ts->tv_sec = maxnsec / NSEC_PER_SEC;
|
||||||
ts->tv_nsec = maxnsec % NSEC_PER_SEC;
|
ts->tv_nsec = maxnsec % NSEC_PER_SEC;
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ static int arm_timer_maxdelay(struct oneshot_lowerhalf_s *lower_,
|
|||||||
struct arm_timer_lowerhalf_s *lower =
|
struct arm_timer_lowerhalf_s *lower =
|
||||||
(struct arm_timer_lowerhalf_s *)lower_;
|
(struct arm_timer_lowerhalf_s *)lower_;
|
||||||
|
|
||||||
uint64_t maxnsec = nsec_from_count(UINT32_MAX, lower->freq);
|
uint64_t maxnsec = nsec_from_count(UINT64_MAX, lower->freq);
|
||||||
|
|
||||||
ts->tv_sec = maxnsec / NSEC_PER_SEC;
|
ts->tv_sec = maxnsec / NSEC_PER_SEC;
|
||||||
ts->tv_nsec = maxnsec % NSEC_PER_SEC;
|
ts->tv_nsec = maxnsec % NSEC_PER_SEC;
|
||||||
|
|||||||
Reference in New Issue
Block a user