/* Configure the internal OSC48M oscillator clock source. 
Configures the 48MHz (nominal) internal RC oscillator with the given configuration settings. */
void system_clock_source_osc48m_set_config(struct system_clock_source_osc48m_config *const config)
/* Configure the internal OSC48M oscillator clock source. 
Configures the 48MHz (nominal) internal RC oscillator with the given configuration settings. */
void system_clock_source_osc48m_set_config(struct system_clock_source_osc48m_config *const config)
{
	Assert(config);
	OSCCTRL_OSC48MCTRL_Type temp = OSCCTRL->OSC48MCTRL;
	temp.bit.ONDEMAND = config->on_demand;
	temp.bit.RUNSTDBY = config->run_in_standby;
	OSCCTRL->OSC48MCTRL = temp;
	if (config->div != OSCCTRL->OSC48MDIV.reg) {
		OSCCTRL->OSC48MDIV.reg = OSCCTRL_OSC48MDIV_DIV(config->div);
		while(OSCCTRL->OSC48MSYNCBUSY.reg) ;
	}
	OSCCTRL->OSC48MSTUP.reg = OSCCTRL_OSC48MSTUP_STARTUP(config->startup_time);
}