Microchip® Advanced Software Framework

main_s.c File Reference

WINC3400 Iperf Server Example.

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

#include "asf.h"
#include <string.h>
#include "common/include/nm_common.h"
#include "driver/include/m2m_wifi.h"
#include "driver/include/m2m_periph.h"
#include "socket/include/socket.h"
#include "iperf.h"
#include "conf_board.h"
#include "bus_wrapper/include/nm_bus_wrapper.h"
#include "driver/source/nmasic.h"

Data Structures

struct  s_msg_wifi_product
 Message format definitions. More...
 

Macros

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

Typedefs

typedef struct s_msg_wifi_product t_msg_wifi_product
 Message format definitions. More...
 

Functions

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

Variables

uint32 clientIPAddress
 
uint32 gu32IPAddress
 
app_status iperf_app_stat = {0,0,0,0}
 
SOCKET tcp_client_sock = -1
 
uint32_t tcp_serv_pack_recv = 0
 
uint32_t udp_serv_pack_recv = 0
 
SOCKET udp_server_sock = -1
 
static volatile uint8_t wifi_connected
 Wi-Fi connection state. More...
 

#define STRING_EOL   "\r\n"

Referenced by main().

#define STRING_HEADER
Value:
"-- WINC3400 IPERF server example --"STRING_EOL \
"-- "BOARD_NAME " --"STRING_EOL \
"-- Compiled: "__DATE__ " "__TIME__ " --"STRING_EOL
#define STRING_EOL
Definition: main_s.c:150
#define BOARD_NAME
Name of the board.
Definition: same70_xplained.h:75

Referenced by main().

Message format definitions.

static void configure_console ( void  )
static
static void iperf_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. Existing types are:

References gu32IPAddress, IPERF_WIFI_M2M_WLAN_AUTH, IPERF_WIFI_M2M_WLAN_PSK, IPERF_WIFI_M2M_WLAN_SSID, M2M_WIFI_CH_ALL, m2m_wifi_connect(), M2M_WIFI_CONNECTED, M2M_WIFI_DISCONNECTED, M2M_WIFI_REQ_DHCP_CONF, M2M_WIFI_RESP_CON_STATE_CHANGED, MODE_INIT, app_status::tcp_server, tstrM2MIPConfig::u32StaticIP, tstrM2mWifiStateChanged::u8CurrState, app_status::udp_server, and wifi_connected.

Referenced by main().

uint32 clientIPAddress

Referenced by IperfSocketEventHandler(), and main().

app_status iperf_app_stat = {0,0,0,0}
SOCKET tcp_client_sock = -1
uint32_t tcp_serv_pack_recv = 0

Referenced by IperfPrintStats(), and main().

uint32_t udp_serv_pack_recv = 0

Referenced by IperfPrintUdpServerStats(), and main().

SOCKET udp_server_sock = -1

Referenced by IperfSocketEventHandler(), and main().

volatile uint8_t wifi_connected
static

Wi-Fi connection state.

Referenced by iperf_wifi_cb().