/* Configure the external oscillator clock failure detect. 
Configures the external oscillator clock failure detect with the given configuration settings. */
static void system_clock_source_xosc_set_failure_detect(struct system_clock_failure_detect *const config)
/* Configure the external oscillator clock failure detect. 
Configures the external oscillator clock failure detect with the given configuration settings. */
static void system_clock_source_xosc_set_failure_detect(struct system_clock_failure_detect *const config)
{
	if (config->cfd_enable) {
		OSCCTRL->XOSCCTRL.reg |=  OSCCTRL_XOSCCTRL_CFDEN;
		OSCCTRL->CFDPRESC.reg = config->cfd_divider;
		OSCCTRL->EVCTRL.reg = config->cfd_event_out;
	} else {
		OSCCTRL->XOSCCTRL.reg &= ~OSCCTRL_XOSCCTRL_CFDEN;
	}
}