예제 #1
0
static void SetConfig(void)
{
    MENU_CMD choice;

    do
    {
        serPutRomString(menu);
        choice = GetMenuChoice();
        if ( choice != MENU_CMD_INVALID )
            ExecuteMenuChoice(choice);
    } while(choice != MENU_CMD_QUIT);

}
예제 #2
0
int main(void)
{
     UINT32  menu_choice;
    
    menu_choice = 'y';
        OpenUart(UART1,BAUDERATE);
        OpenUart(UART2,BAUDERATE);
//        OpenUart(UART3,BAUDERATE);
//        OpenUart(UART4,BAUDERATE);
        OpenUart(UART5,BAUDERATE);
        OpenUart(UART6,BAUDERATE);

//IMPORTANT POUR ACTIVER LE RX UART5. INFO TROUVEE SUR LE NET
        PORTSetPinsDigitalIn(IOPORT_B,BIT_8);  

    while (1)
    {

        if (menu_choice=='n')
        {

            SendDataBuffer(UARTTEST,goodbye);
            
            return(0);
        }
        if (menu_choice=='y')
        {

        menu_choice = 'n';
        

        SendDataBuffer(UART1,myHelloStr1);
        SendDataBuffer(UART1,mainMenu);        

        SendDataBuffer(UART2,myHelloStr2);
        SendDataBuffer(UART2,mainMenu);        


//        SendDataBuffer(UART3,myHelloStr3);
//        SendDataBuffer(UART3,mainMenu);


//        SendDataBuffer(UART4,myHelloStr4);
//        SendDataBuffer(UART4,mainMenu);


        SendDataBuffer(UART5,myHelloStr5);
        SendDataBuffer(UART5,mainMenu);


        SendDataBuffer(UART6,myHelloStr6);
        SendDataBuffer(UART6,mainMenu);





        menu_choice = GetMenuChoice();
        }
    }
    return (0);
}