/* Writes a Generic Clock configuration to the hardware module. 
Writes out a given configuration of a Generic Clock configuration to the hardware module. If the clock is currently running, it will be stopped. */
void system_gclk_chan_set_config(const uint8_t channel, struct system_gclk_chan_config *const config)
/* Writes a Generic Clock configuration to the hardware module. 
Writes out a given configuration of a Generic Clock configuration to the hardware module. If the clock is currently running, it will be stopped. */
void system_gclk_chan_set_config(const uint8_t channel, struct system_gclk_chan_config *const config)
{
	Assert(config);
	system_gclk_chan_disable(channel);
	GCLK->PCHCTRL[channel].reg = GCLK_PCHCTRL_GEN(config->source_generator);
}