/* return The current MCG_Lite mode or error code.  */
mcglite_mode_t CLOCK_GetMode(void)
/* return The current MCG_Lite mode or error code.  */
mcglite_mode_t CLOCK_GetMode(void)
{
    mcglite_mode_t mode;
    switch (MCG_S_CLKST_VAL)
    {
        case kMCGLITE_ClkSrcHirc:
            mode = kMCGLITE_ModeHirc48M;
            break;
        case kMCGLITE_ClkSrcLirc:
            if (kMCGLITE_Lirc2M == MCG_C2_IRCS_VAL)
            {
                mode = kMCGLITE_ModeLirc2M;
            }
            else
            {
                mode = kMCGLITE_ModeLirc8M;
            }
            break;
        case kMCGLITE_ClkSrcExt:
            mode = kMCGLITE_ModeExt;
            break;
        default:
            mode = kMCGLITE_ModeError;
            break;
    }
    return mode;
}