/* Enable or disable the interrupt. In counter mode, when the count has been completed, an interrupt is generated. In PWM mode, on a level change, an interupt is generated. In either capture mode, when a capture is complete, an interrupt is generated.  */
void timer_int_enable(uint32_t timer, bool en)
/* Enable or disable the interrupt. In counter mode, when the count has been completed, an interrupt is generated. In PWM mode, on a level change, an interupt is generated. In either capture mode, when a capture is complete, an interrupt is generated.  */
void timer_int_enable(uint32_t timer, bool en)
{
	if (en) {
		TIMER_INTCTL(timer) |= TIMER_INTCTL_INTEN;
	} else {
		TIMER_INTCTL(timer) &= ~TIMER_INTCTL_INTEN;
	}
}