main.c
static long WlanConnect()
{
    SlSecParams_t secParams = {0};
    long lRetVal = 0;

    secParams.Key = (signed char*)SECURITY_KEY;
    secParams.KeyLen = strlen(SECURITY_KEY);
    secParams.Type = SECURITY_TYPE;

    lRetVal = sl_WlanConnect((signed char*)SSID_NAME, strlen(SSID_NAME), 0, &secParams, 0);
    ASSERT_ON_ERROR(lRetVal);

    UART_PRINT("abc\n");
    // Wait for WLAN Event
    while((!IS_CONNECTED(g_ulStatus)) || (!IS_IP_ACQUIRED(g_ulStatus)))
    {
        // Toggle LEDs to Indicate Connection Progress
        GPIO_IF_LedOff(MCU_IP_ALLOC_IND);
        MAP_UtilsDelay(800000);
        GPIO_IF_LedOn(MCU_IP_ALLOC_IND);
        MAP_UtilsDelay(800000);
    }

    UART_PRINT("###\n");
    return SUCCESS;

}
//****************************************************************************
//
//! \brief Connecting to a WLAN Accesspoint
//!
//!  This function connects to the required AP (SSID_NAME) with Security
//!  parameters specified in te form of macros at the top of this file
//!
//! \param  None
//!
//! \return  None
//!
//! \warning    If the WLAN connection fails or we don't aquire an IP
//!            address, It will be stuck in this function forever.
//
//****************************************************************************

\brief Connecting to a WLAN Accesspoint
This function connects to the required AP (SSID_NAME) with Security
parameters specified in te form of macros at the top of this file

\param  None

\return  None

\warning    If the WLAN connection fails or we don't aquire an IP
address, It will be stuck in this function forever.
\ brief Connecting to a WLAN Accesspoint This function connects to the required AP ( SSID_NAME ) with Security parameters specified in te form of macros at the top of this file \ param None \ return None \ warning If the WLAN connection fails or we don ' t aquire an IP address It will be stuck in this function forever .
static long WlanConnect()
{
    SlSecParams_t secParams = {0};
    long lRetVal = 0;
    secParams.Key = (signed char*)SECURITY_KEY;
    secParams.KeyLen = strlen(SECURITY_KEY);
    secParams.Type = SECURITY_TYPE;
    lRetVal = sl_WlanConnect((signed char*)SSID_NAME, strlen(SSID_NAME), 0, &secParams, 0);
    ASSERT_ON_ERROR(lRetVal);
    UART_PRINT("abc\n");
    while((!IS_CONNECTED(g_ulStatus)) || (!IS_IP_ACQUIRED(g_ulStatus)))
    {
        GPIO_IF_LedOff(MCU_IP_ALLOC_IND);
        MAP_UtilsDelay(800000);
        GPIO_IF_LedOn(MCU_IP_ALLOC_IND);
        MAP_UtilsDelay(800000);
    }
    UART_PRINT("###\n");
    return SUCCESS;
}
static long WlanConnect ( ) { SlSecParams_t secParams = { 0 } ; long lRetVal = 0 ; secParams . Key = ( signed char * ) SECURITY_KEY ; secParams . KeyLen = strlen ( SECURITY_KEY ) ; secParams . Type = SECURITY_TYPE ; lRetVal = sl_WlanConnect ( ( signed char * ) SSID_NAME , strlen ( SSID_NAME ) , 0 , & secParams , 0 ) ; ASSERT_ON_ERROR ( lRetVal ) ; UART_PRINT ( " \n " ) ; while ( ( ! IS_CONNECTED ( g_ulStatus ) ) || ( ! IS_IP_ACQUIRED ( g_ulStatus ) ) ) { GPIO_IF_LedOff ( MCU_IP_ALLOC_IND ) ; MAP_UtilsDelay ( 800000 ) ; GPIO_IF_LedOn ( MCU_IP_ALLOC_IND ) ; MAP_UtilsDelay ( 800000 ) ; } UART_PRINT ( " \n " ) ; return SUCCESS ; }
\brief Connecting to a WLAN Accesspoint
This function connects to the required AP (SSID_NAME) with Security
parameters specified in te form of macros at the top of this file
\ brief Connecting to a WLAN Accesspoint This function connects to the required AP ( SSID_NAME ) with Security parameters specified in te form of macros at the top of this file
// Wait for WLAN Event
 // Toggle LEDs to Indicate Connection Progress
