Exemplo n.º 1
0
//****************************************************************************
//							MAIN FUNCTION
//****************************************************************************
void main()
{
    char cMode = 0;

    //
    // Board Initialization
    //
    BoardInit();

    //
    // Configure the pinmux settings for the peripherals exercised
    //
    PinMuxConfig();

    //
    // Configuring UART
    //
#ifndef NOTERM
    InitTerm();
#endif  //NOTERM
    //
    // Display banner
    //
    DisplayBanner(APP_NAME);

    //
    // staring simplelink
    //
    cMode = sl_Start(NULL,NULL,NULL);

    //
    // Display current mode and ssid name(for AP mode)
    //
    DisplayCurrentConfig(cMode);

    //
    // Configure the networking mode and ssid name(for AP mode)
    //
    ConfigureMode(cMode);

    UART_PRINT("Please restart the device \n\r");
    sl_Stop(SL_STOP_TIMEOUT);
    LOOP_FOREVER(line_number);

}
Exemplo n.º 2
0
//****************************************************************************
//                            MAIN FUNCTION
//****************************************************************************
void main()
{
    int iMode = 0;
    long lRetVal = -1;

    //
    // Board Initialization
    //
    BoardInit();

    //
    // Configure the pinmux settings for the peripherals exercised
    //
    PinMuxConfig();

    //
    // Configuring UART
    //
#ifndef NOTERM
    InitTerm();
#endif

    //
    // Display banner
    //
    DisplayBanner(APP_NAME);

    //
    // staring simplelink
    //
    iMode = sl_Start(NULL,NULL,NULL);
    if(iMode < 0)
    {
        ERR_PRINT("Device start failed \n\r");
        LOOP_FOREVER();
    }

    //
    // Display current mode and ssid name(for AP mode)
    //
    lRetVal = DisplayCurrentConfig(iMode);
    if(lRetVal < 0)
    {
        ERR_PRINT("Can not get current device config \n\r");
        LOOP_FOREVER();
    }

    //
    // Configure the networking mode and ssid name(for AP mode)
    //
    lRetVal = ConfigureMode(iMode);
    if(lRetVal < 0)
    {
        ERR_PRINT("Can not get current device config \n\r");
        LOOP_FOREVER();
    }

    UART_PRINT("Restarting network device... \n\r");
    lRetVal = sl_Stop(SL_STOP_TIMEOUT);

    LOOP_FOREVER();
}