/* Initializes TIMER0 module instance. 
Initializes the TIMER0 module, based on the given configuration values. */
void timer_init(const struct timer_config *config)
/* Initializes TIMER0 module instance. 
Initializes the TIMER0 module, based on the given configuration values. */
void timer_init(const struct timer_config *config)
{
	system_peripheral_reset(PERIPHERAL_TIMER);
	TIMER0->CTRL.reg = config->interrupt_enable << TIMER_CTRL_INTERRUPT_ENABLE_Pos;
	TIMER0->RELOAD.reg = config->reload_value;
	timer_callback = NULL;
	system_register_isr(RAM_ISR_TABLE_TIMER0_INDEX, (uint32_t)timer_isr_handler);
}