Microchip® Advanced Software Framework

wilc_netif.c File Reference

WILC Network Interface Driver for lwIP.

Copyright (c) 2016-2018 Microchip Technology Inc. and its subsidiaries.

#include <lwip/opt.h>
#include <lwip/def.h>
#include <lwip/mem.h>
#include <lwip/pbuf.h>
#include <lwip/sys.h>
#include <lwip/ethip6.h>
#include <lwip/stats.h>
#include <lwip/snmp.h>
#include <lwip/tcpip.h>
#include <netif/etharp.h>
#include <netif/include/wilc_netif.h>
#include <sysclk.h>
#include <string.h>
#include <semphr.h>
#include <os/include/m2m_wifi_ex.h>
#include <os/include/net_init.h>

Macros

#define IFNAME0   'e'
 Define those to better describe your network interface. More...
 
#define IFNAME1   'n'
 
#define NET_LINK_SPEED   100000000
 Network link speed. More...
 
#define NET_MTU   1500
 Maximum transfer unit. More...
 
#define WILC_RX_BUF_SZ   (PBUF_POOL_BUFSIZE - M2M_ETHERNET_HDR_OFFSET)
 
#define WILC_TX_BUF_SIZE   (PBUF_POOL_BUFSIZE - M2M_ETHERNET_HDR_OFFSET)
 

Functions

void wilc_fill_callback_info (tstrEthInitParam *info)
 Configure RX callback and buffer. More...
 
err_t wilc_netif_init (struct netif *netif)
 Initialize lwIP network interface. More...
 
static void wilc_netif_low_level_init (struct netif *netif)
 Perform low level initialization of the netif driver. More...
 
void wilc_netif_rx_callback (uint8 msg_type, void *msg, void *ctrl_buf)
 Receive packets from the WILC under HIF thread context. More...
 
static err_t wilc_netif_tx (struct netif *netif, struct pbuf *p)
 Send packet from lwIP to HIF task for processing. More...
 
void wilc_netif_tx_from_queue (hif_msg_t *msg)
 Send pending packets to the WILC under HIF thread context. More...
 

Variables

xQueueHandle hif_queue
 Queue used by HIF task. More...
 
static uint8_t rx_buf [WILC_RX_BUF_SZ]
 
static struct pbufrx_first
 
static struct pbufrx_last
 
static uint8_t tx_buf [WILC_TX_BUF_SIZE]
 
struct netif wilc_netif_c_mode
 The netif for the WILC1000 in concurrent (AP or WiFi Direct) mode. More...
 
struct netif wilc_netif_sta
 The netif for the WILC1000 in station mode. More...
 

#define IFNAME0   'e'

Define those to better describe your network interface.

Referenced by wilc_netif_init().

#define IFNAME1   'n'

Referenced by wilc_netif_init().

#define NET_LINK_SPEED   100000000

Network link speed.

Referenced by wilc_netif_init().

#define NET_MTU   1500

Maximum transfer unit.

Referenced by wilc_netif_low_level_init().

#define WILC_RX_BUF_SZ   (PBUF_POOL_BUFSIZE - M2M_ETHERNET_HDR_OFFSET)

Referenced by wilc_netif_rx_callback().

#define WILC_TX_BUF_SIZE   (PBUF_POOL_BUFSIZE - M2M_ETHERNET_HDR_OFFSET)

Referenced by wilc_netif_tx().

void wilc_fill_callback_info ( tstrEthInitParam info)
static void wilc_netif_low_level_init ( struct netif netif)
static
void wilc_netif_tx_from_queue ( hif_msg_t msg)

xQueueHandle hif_queue

Queue used by HIF task.

struct pbuf* rx_first
static
struct pbuf* rx_last
static
uint8_t tx_buf[WILC_TX_BUF_SIZE]
static
struct netif wilc_netif_c_mode

The netif for the WILC1000 in concurrent (AP or WiFi Direct) mode.

Referenced by net_add_wilc_netif(), net_interface_down_imp(), net_interface_up_imp(), net_remove_wilc_netif(), net_set_interface_address(), and wilc_netif_rx_callback().