From b8e84e2b6607fe91107c511ea03ea7e3ea70eeaf Mon Sep 17 00:00:00 2001 From: Nathael Pajani Date: Fri, 28 Dec 2018 12:01:36 +0100 Subject: [PATCH] sctimer_on is only for LPC_SCT --- drivers/sctimers.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/drivers/sctimers.c b/drivers/sctimers.c index ea000ef..976d515 100644 --- a/drivers/sctimers.c +++ b/drivers/sctimers.c @@ -268,18 +268,9 @@ int sctimer_on(uint8_t timer_num, uint32_t clkrate, void (*callback)(uint32_t)) } /* Set main configurations */ - if (timer_num == LPC_SCT) { - sct->config = (LPC_SCT_UNIFIED_TIMER | LPC_SCT_CLK_SYSCLK); - /* Reset and disable counter */ - sct->control = (LPC_SCT_CLEAR | LPC_SCT_HALT | LPC_SCT_PRESCALE(prescale)); - } else { - sct->config = LPC_SCT_CLK_SYSCLK; - if (timer_num == LPC_SCT16_T0) { - sct->control = (LPC_SCT_CLEAR | LPC_SCT_HALT | LPC_SCT_PRESCALE(prescale)); - } else { - sct->control = ((LPC_SCT_CLEAR | LPC_SCT_HALT | LPC_SCT_PRESCALE(prescale)) << 16); - } - } + sct->config = (LPC_SCT_UNIFIED_TIMER | LPC_SCT_CLK_SYSCLK); + /* Reset and disable counter */ + sct->control = (LPC_SCT_CLEAR | LPC_SCT_HALT | LPC_SCT_PRESCALE(prescale)); /* Store the callback, OK even if none given */ sctimer.callback = callback; -- 2.43.0