/* Set delay time for DAC to become stable.  */
uint32_t DAC_SetDelayTime(DAC_T *dac, uint32_t u32Delay)
/* Set delay time for DAC to become stable.  */
uint32_t DAC_SetDelayTime(DAC_T *dac, uint32_t u32Delay)
{
    dac->TCTL = ((CLK_GetPCLK1Freq() * u32Delay / 1000000UL) & 0x3FFUL);
    return ((dac->TCTL) * 1000000UL / CLK_GetPCLK1Freq());
}