/* Determins if the specified Generic Clock channel is locked.  */
bool system_gclk_chan_is_locked(const uint8_t channel)
/* Determins if the specified Generic Clock channel is locked.  */
bool system_gclk_chan_is_locked(const uint8_t channel)
{
	bool locked;
	system_interrupt_enter_critical_section();
	locked = GCLK->PCHCTRL[channel].bit.WRTLOCK;
	system_interrupt_leave_critical_section();
	return locked;
}