/* Set the specified data holding register value for dual DAC channel.  */
void DAC_ConfigDualChannelData(DAC_ALIGN_T align, uint16_t data2, uint16_t data1)
/* Set the specified data holding register value for dual DAC channel.  */
void DAC_ConfigDualChannelData(DAC_ALIGN_T align, uint16_t data2, uint16_t data1)
{
    uint32_t data = 0, tmp = 0;
    if (align == DAC_ALIGN_8BIT_R)
    {
        data = ((uint32_t)data2 << 8) | data1;
    }
    else
    {
        data = ((uint32_t)data2 << 16) | data1;
    }
    tmp = (uint32_t)DAC_BASE;
    tmp += 0x00000020 + align;
    *(__IO uint32_t *)tmp = data;
}