Microchip® Advanced Software Framework

winc3400/iperf_server_example/main21.c File Reference

WINC3400 Iperf Server Example.

Copyright (c) 2017-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 "socket/include/socket.h"
#include "iperf.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 iperf_wifi_cb (uint8_t u8MsgType, void *pvMsg)
 Callback to get the Wi-Fi status update. More...
 
int main (void)
 Main application function. More...
 
void SysTick_Handler (void)
 

Variables

static struct usart_module cdc_uart_module
 UART module for debug. More...
 
uint32 clientIPAddress
 
uint32 gu32IPAddress
 
app_status iperf_app_stat = {0,0,0,0}
 
volatile uint32_t ms_ticks = 0
 SysTick counter to avoid busy wait delay. More...
 
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: winc3400/iperf_server_example/main21.c:147
#define BOARD_NAME
Definition: app_init.h:140

Referenced by main().

Message format definitions.

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, printf, app_status::tcp_server, tstrM2MIPConfig::u32StaticIP, tstrM2mWifiStateChanged::u8CurrState, app_status::udp_server, and wifi_connected.

Referenced by main().

void SysTick_Handler ( void  )

References ms_ticks.

struct usart_module cdc_uart_module
static

UART module for debug.

uint32 clientIPAddress

Referenced by IperfSocketEventHandler(), and main().

app_status iperf_app_stat = {0,0,0,0}
volatile uint32_t ms_ticks = 0

SysTick counter to avoid busy wait delay.

TLS read functionality.

SysTick counter for non busy wait delay.

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().