/* Selects the loop mode. This has no use in PWM mode. In loop mode with counter mode, the counter will constantly loop. In loop mode with the capture modes, the values will be captured again and again. In single mode, these operations happen only once.  */
void timer_loop_mode(uint32_t timer, enum timer_loop_modes mode)
/* Selects the loop mode. This has no use in PWM mode. In loop mode with counter mode, the counter will constantly loop. In loop mode with the capture modes, the values will be captured again and again. In single mode, these operations happen only once.  */
void timer_loop_mode(uint32_t timer, enum timer_loop_modes mode)
{
	if (mode) {
		TIMER_CTRL(timer) |= TIMER_CTRL_LMOD;
	} else {
		TIMER_CTRL(timer) &= ~TIMER_CTRL_LMOD;
	}
}