/* Trigger the DAC by a Software Trigger. 
If the trigger source is set to be a software trigger, cause a trigger to occur. The trigger is cleared by hardware after conversion. */
void dac_software_trigger(uint32_t dac, int channel)
/* Trigger the DAC by a Software Trigger. 
If the trigger source is set to be a software trigger, cause a trigger to occur. The trigger is cleared by hardware after conversion. */
void dac_software_trigger(uint32_t dac, int channel)
{
	switch (channel) {
	case DAC_CHANNEL1:
		DAC_SWTRIGR(dac) |= DAC_SWTRIGR_SWTRIG1;
		break;
	case DAC_CHANNEL2:
		DAC_SWTRIGR(dac) |= DAC_SWTRIGR_SWTRIG2;
		break;
	case DAC_CHANNEL_BOTH:
		DAC_SWTRIGR(dac) |= (DAC_SWTRIGR_SWTRIG1 | DAC_SWTRIGR_SWTRIG2);
		break;
	default:
		break;
	}
}
/**@}