/* This function make DAC module be ready to convert.  */
void DAC_Open(DAC_T *dac, uint32_t u32Ch, uint32_t u32TrgSrc)
/* This function make DAC module be ready to convert.  */
void DAC_Open(DAC_T *dac, uint32_t u32Ch, uint32_t u32TrgSrc)
{
    (void)u32Ch;
    dac->CTL &= ~(DAC_CTL_ETRGSEL_Msk | DAC_CTL_TRGSEL_Msk | DAC_CTL_TRGEN_Msk);
    dac->CTL |= (u32TrgSrc | DAC_CTL_DACEN_Msk);
}