/* Aborts an ongoing job. 
Aborts an ongoing job. */
void dac_chan_abort_job(struct dac_module *module_inst, const enum dac_channel channel)
/* Aborts an ongoing job. 
Aborts an ongoing job. */
void dac_chan_abort_job(struct dac_module *module_inst, const enum dac_channel channel)
{
	Assert(module_inst);
	switch(channel) {
	case DAC_CHANNEL_0:
		module_inst->hw->INTFLAG.reg = DAC_INTFLAG_UNDERRUN0 | DAC_INTFLAG_EMPTY0;
		module_inst->hw->INTENCLR.reg = DAC_INTENCLR_UNDERRUN0 | DAC_INTENCLR_EMPTY0;
		break;
	case DAC_CHANNEL_1:
		module_inst->hw->INTFLAG.reg = DAC_INTFLAG_UNDERRUN1 | DAC_INTFLAG_EMPTY1;
		module_inst->hw->INTENCLR.reg = DAC_INTENCLR_UNDERRUN1 | DAC_INTENCLR_EMPTY1;
		break;
	default:
		break;
	}
	module_inst->job_status[channel] = STATUS_ABORTED;
	module_inst->remaining_conversions[channel] = 0;
}