/* brief Return Frequency of DAC Clock return Frequency of DAC.  */
uint32_t CLOCK_GetDacClkFreq(uint32_t id)
/* brief Return Frequency of DAC Clock return Frequency of DAC.  */
uint32_t CLOCK_GetDacClkFreq(uint32_t id)
{
    uint32_t freq = 0U;
    switch (SYSCON->DAC[id].CLKSEL)
    {
        case 1U:
            freq = CLOCK_GetPll0OutFreq();
            break;
        case 2U:
            freq = CLOCK_GetExtClkFreq();
            break;
        case 3U:
            freq = CLOCK_GetFroHfFreq();
            break;
        case 4U:
            freq = CLOCK_GetFro12MFreq();
            break;
        case 5U:
            freq = CLOCK_GetPll1OutFreq() / (((SYSCON->PLL1CLK0DIV) & 0xffU) + 1U);
            break;
        default:
            freq = 0U;
            break;
    }
    return freq / ((SYSCON->DAC[id].CLKDIV & SYSCON_DAC_CLKDIV_DIV_MASK) + 1U);
}