From 6ea32ee488c8b76202d6707515dfff8cc2b28e4b Mon Sep 17 00:00:00 2001 From: zylx Date: Thu, 13 Dec 2018 09:59:07 +0800 Subject: [PATCH] [components][drivers] delete redundant judgment --- components/drivers/hwtimer/hwtimer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/drivers/hwtimer/hwtimer.c b/components/drivers/hwtimer/hwtimer.c index aafa465b1e..cd85b3baef 100644 --- a/components/drivers/hwtimer/hwtimer.c +++ b/components/drivers/hwtimer/hwtimer.c @@ -37,7 +37,7 @@ rt_inline rt_uint32_t timeout_calc(rt_hwtimer_t *timer, rt_hwtimerval_t *tv) { timeout = tv_sec/i; - if (timeout <= overflow && timeout * timer->freq <= timer->info->maxcnt) + if (timeout <= overflow) { counter = timeout*timer->freq; devi = tv_sec - (counter/(float)timer->freq)*i; -- GitLab