/* Initializes the DAC peripheral according to the specified parameters in the dacConfig.  */
void DAC_Config(uint32_t channel, DAC_Config_T *dacConfig)
/* Initializes the DAC peripheral according to the specified parameters in the dacConfig.  */
void DAC_Config(uint32_t channel, DAC_Config_T *dacConfig)
{
    uint32_t tmpcfg;
    tmpcfg = (dacConfig->trigger | dacConfig->waveGeneration |
             dacConfig->maskAmplitudeSelect | dacConfig->outputBuff);
    DAC->CTRL = (tmpcfg << channel);
}