Microchip® Advanced Software Framework

winc3400/ap_scan_example/main21.c File Reference

WINC3400 AP Scan Example.

Copyright (c) 2017-2019 Microchip Technology Inc. and its subsidiaries.

#include "asf.h"
#include "main.h"
#include "driver/include/m2m_wifi.h"
#include "driver/source/nmasic.h"

Macros

#define STRING_EOL   "\r\n"
 
#define STRING_HEADER
 

Functions

static void configure_console (void)
 Configure UART console. More...
 
int main (void)
 Main application function. More...
 
static void wifi_cb (uint8_t u8MsgType, void *pvMsg)
 Callback to get the Wi-Fi status update. More...
 

Variables

static struct usart_module cdc_uart_module
 UART module for debug. More...
 
static uint8_t num_found_ap = 0
 Number of APs found. More...
 
static uint8_t scan_request_index = 0
 Index of scan list to request scan result. More...
 

#define STRING_EOL   "\r\n"
#define STRING_HEADER
Value:
"-- WINC3400 AP scan example --"STRING_EOL \
"-- "BOARD_NAME " --"STRING_EOL \
"-- Compiled: "__DATE__ " "__TIME__ " --"STRING_EOL
#define BOARD_NAME
Definition: app_init.h:140
#define STRING_EOL
Definition: winc3400/ap_scan_example/main21.c:91

Referenced by main().

int main ( void  )
static void wifi_cb ( uint8_t  u8MsgType,
void *  pvMsg 
)
static

Callback to get the Wi-Fi status update.

Parameters
[in]u8MsgTypetype of Wi-Fi notification. Possible types are:
[in]pvMsgA pointer to a buffer containing the notification parameters (if any). It should be casted to the correct data type corresponding to the notification type.

References tstrM2mWifiscanResult::au8SSID, M2M_WIFI_CH_ALL, m2m_wifi_connect(), M2M_WIFI_CONNECTED, M2M_WIFI_DISCONNECTED, m2m_wifi_get_num_ap_found(), M2M_WIFI_REQ_DHCP_CONF, m2m_wifi_req_scan_result(), m2m_wifi_request_scan(), M2M_WIFI_RESP_CON_STATE_CHANGED, M2M_WIFI_RESP_SCAN_DONE, M2M_WIFI_RESP_SCAN_RESULT, MAIN_WLAN_AUTH, MAIN_WLAN_PSK, MAIN_WLAN_SSID, num_found_ap, printf, scan_request_index, tstrM2mWifiStateChanged::u8CurrState, and tstrM2mScanDone::u8NumofCh.

Referenced by main().

struct usart_module cdc_uart_module
static

UART module for debug.

uint8_t num_found_ap = 0
static

Number of APs found.

Referenced by wifi_cb().

uint8_t scan_request_index = 0
static

Index of scan list to request scan result.

Referenced by wifi_cb().