/* Get the MCG external reference clock frequency. 
Get the current MCG external reference clock frequency in Hz. It is the frequency select by MCG_C7. This is an internal function. */
static uint32_t CLOCK_GetMcgExtClkFreq(void)
/* Get the MCG external reference clock frequency. 
Get the current MCG external reference clock frequency in Hz. It is the frequency select by MCG_C7. This is an internal function. */
static uint32_t CLOCK_GetMcgExtClkFreq(void)
{
    uint32_t freq;
    switch (MCG_C7_OSCSEL_VAL)
    {
        case 0U:
            assert(g_xtal0Freq);
            freq = g_xtal0Freq;
            break;
        case 1U:
            assert(g_xtal32Freq);
            freq = g_xtal32Freq;
            break;
        case 2U:
            freq = MCG_INTERNAL_IRC_48M;
            break;
        default:
            freq = 0U;
            break;
    }
    return freq;
}