/* Sets the ADC window mode. 
Sets the ADC window mode to a given mode and value range. */
void adc_set_window_mode(struct adc_module *const module_inst, const enum adc_window_mode window_mode, const int16_t window_lower_value, const int16_t window_upper_value)
/* Sets the ADC window mode. 
Sets the ADC window mode to a given mode and value range. */
void adc_set_window_mode(struct adc_module *const module_inst, const enum adc_window_mode window_mode, const int16_t window_lower_value, const int16_t window_upper_value)
{
	Assert(module_inst);
	Assert(module_inst->hw);
	Adc *const adc_module = module_inst->hw;
	while (adc_is_syncing(module_inst)) {
	}
	adc_module->WINCTRL.reg = window_mode << ADC_WINCTRL_WINMODE_Pos;
	while (adc_is_syncing(module_inst)) {
	}
	adc_module->WINLT.reg = window_lower_value << ADC_WINLT_WINLT_Pos;
	while (adc_is_syncing(module_inst)) {
	}
	adc_module->WINUT.reg = window_upper_value << ADC_WINUT_WINUT_Pos;
}