示例#1
0
文件: main.c 项目: paduc77/gainos
int main()
{
#if 1
    WDT_Disable(WDT); 
    /* Set 3 FWS for Embedded Flash Access */
    EFC->EEFC_FMR = EEFC_FMR_FWS(3);
    CLOCK_SetConfig(2);
    /* I don't know why, the baudrate is 38400 = 115200/3 */
    UART_Configure(115200, 64000000/3);// so I add this to solve the problem
    printf("Start GaInOS-TK.\r\n");
#endif   
    StartOS(OSDEFAULTAPPMODE);
    return 0;
}
示例#2
0
//------------------------------------------------------------------------------
/// Change clock configuration.
//------------------------------------------------------------------------------
void CLOCK_UserChangeConfig(void)
{
    unsigned char key = 0;
  
    while (1)
    {
        CLOCK_DisplayMenu();      
        key = DBGU_GetChar();

        if ((key >= '0') && (key <= ('0' + NB_CLOCK_CONFIGURATION - 1)))
        {
            CLOCK_SetConfig(key - '0');
            break;
        }
    }
}