/* Load DAC Dual Data Register. 
Loads the appropriate digital to analog converter dual data register with 12 or 8 bit data to be converted for both channels. This allows high bandwidth simultaneous or independent analog output. The data in both channels are aligned identically. */
void dac_load_data_buffer_dual(uint16_t dac_data1, uint16_t dac_data2, data_align dac_data_format)
/* Load DAC Dual Data Register. 
Loads the appropriate digital to analog converter dual data register with 12 or 8 bit data to be converted for both channels. This allows high bandwidth simultaneous or independent analog output. The data in both channels are aligned identically. */
void dac_load_data_buffer_dual(uint16_t dac_data1, uint16_t dac_data2, data_align dac_data_format)
{
	switch (dac_data_format) {
	case RIGHT8:
		DAC_DHR8RD = ((dac_data1 & MASK8) | ((dac_data2 & MASK8) << 8));
		break;
	case RIGHT12:
		DAC_DHR12RD = ((dac_data1 & MASK12) |
				((dac_data2 & MASK12) << 16));
		break;
	case LEFT12:
		DAC_DHR12LD = ((dac_data1 & MASK12) |
				((dac_data2 & MASK12) << 16));
		break;
	}
}