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 "ethernet_phy.h"
#include "emac.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 |
Configure ethernet interface.
References ip_addr::addr, dhcp_start(), ERR_OK, ETHERNET_CONF_GATEWAY_ADDR0, ETHERNET_CONF_GATEWAY_ADDR1, ETHERNET_CONF_GATEWAY_ADDR2, ETHERNET_CONF_GATEWAY_ADDR3, ETHERNET_CONF_IPADDR0, ETHERNET_CONF_IPADDR1, ETHERNET_CONF_IPADDR2, ETHERNET_CONF_IPADDR3, ETHERNET_CONF_NET_MASK0, ETHERNET_CONF_NET_MASK1, ETHERNET_CONF_NET_MASK2, ETHERNET_CONF_NET_MASK3, ethernetif_init(), g_ip_mode, gs_net_if, IP4_ADDR, LWIP_ASSERT, netif_add(), netif_set_default(), netif_set_status_callback(), netif_set_up(), NULL, status_callback(), and tcpip_input().
Referenced by init_ethernet().
Initialize ethernet stask.
Initialize the ethernet interface.
References ethernet_configure_interface(), NULL, and tcpip_init().
Referenced by gfx_task().
Status callback used to print assigned IP address.
Status callback used to print address given by DHCP.
netif | Instance to network interface. |
References g_c_ipconfig, g_ip_mode, inet_ntoa, netif::ip_addr, and netif_is_up.
Referenced by ethernet_configure_interface(), and netif_set_status_callback().
int8_t g_c_ipconfig[] |
Referenced by gfx_task(), and status_callback().
uint32_t g_ip_mode |
Referenced by ethernet_configure_interface(), event_handler(), gfx_task(), and status_callback().
struct netif gs_net_if |
Referenced by ethernet_configure_interface().