}
/* 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;