/* Locks a Generic Clock channel from further configuration writes. 
Locks a generic clock channel from further configuration writes. It is only possible to unlock the channel configuration through a power on reset. */
void system_gclk_chan_lock(const uint8_t channel)
/* Locks a Generic Clock channel from further configuration writes. 
Locks a generic clock channel from further configuration writes. It is only possible to unlock the channel configuration through a power on reset. */
void system_gclk_chan_lock(const uint8_t channel)
{
	system_interrupt_enter_critical_section();
	GCLK->PCHCTRL[channel].reg |= GCLK_PCHCTRL_WRTLOCK | GCLK_PCHCTRL_CHEN;
	system_interrupt_leave_critical_section();
}