|
|
|
@ -273,7 +273,7 @@ int countertimer_tc_setup(uint8_t timer_num, const struct lpc_tc_config* conf)
|
|
|
|
|
/* Select between timer (counts on PCLK) and counter mode (counts on CAP events) */
|
|
|
|
|
if (conf->mode & LPC_TIMER_MODE_COUNTER) {
|
|
|
|
|
/* Configure the counter */
|
|
|
|
|
timer->regs->count_ctrl = (conf->count_control & 0x0F);
|
|
|
|
|
timer->regs->count_ctrl = (conf->count_control & 0x03);
|
|
|
|
|
timer->regs->count_ctrl |= LPC_COUNTER_INC_INPUT(conf->count_chan);
|
|
|
|
|
} else {
|
|
|
|
|
/* Timer mode */
|
|
|
|
|