Microchip® Advanced Software Framework

netconn_http_stats_example/network/ethernet.c File Reference

Ethernet management for LwIP (threaded mode).

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

#include <string.h>
#include "board.h"
#include "ethernet.h"
#include "sysclk.h"
#include "lwip/sys.h"
#include "lwip/api.h"
#include "lwip/tcp.h"
#include "lwip/tcpip.h"
#include "lwip/memp.h"
#include "lwip/dhcp.h"
#include "lwip/dns.h"
#include "lwip/stats.h"
#include "lwip/init.h"
#include "lwip/ip_frag.h"
#include "lwip/inet.h"
#include "lwip/tcp_impl.h"
#include "netif/etharp.h"

Functions

static void ethernet_configure_interface (void)
 Configure ethernet interface. More...
 
void init_ethernet (void)
 Initialize ethernet stask. More...
 
void status_callback (struct netif *netif)
 Status callback used to print assigned IP address. More...
 

Variables

int8_t g_c_ipconfig []
 
uint32_t g_ip_mode
 
struct netif gs_net_if
 

static void ethernet_configure_interface ( void  )
static
void init_ethernet ( void  )

Initialize ethernet stask.

Initialize the ethernet interface.

Initialize the lwIP TCP/IP stack with the network interface driver.

References ethernet_configure_interface(), lwip_init(), NULL, sys_init_timing(), and tcpip_init().

void status_callback ( struct netif netif)

Status callback used to print assigned IP address.

Status callback used to print address given by DHCP.

Callback function used to print the given IP address when the link is up.

Parameters
netifInstance to network interface.

References g_c_ipconfig, g_ip_mode, inet_ntoa, netif::ip_addr, and netif_is_up.

int8_t g_c_ipconfig[]

Referenced by gfx_task(), and status_callback().

uint32_t g_ip_mode
struct netif gs_net_if