Ethernet management for the lwIP Raw HTTP basic example.
Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
#include <string.h>
#include "board.h"
#include "ethernet.h"
#include "timer_mgt.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"
Data Structures | |
struct | timers_info |
Typedefs | |
typedef struct timers_info | timers_info_t |
Functions | |
static void | ethernet_configure_interface (void) |
Configure network interface driver. More... | |
void | ethernet_task (void) |
Process incoming ethernet frames, then update timers. More... | |
void | init_ethernet (void) |
Initialize the lwIP TCP/IP stack with the network interface driver. More... | |
void | status_callback (struct netif *netif) |
Callback function used to print the given IP address when the link is up. More... | |
static void | timers_update (void) |
Timer management function. More... | |
Variables | |
struct netif | gs_net_if |
static timers_info_t | gs_timers_table [] |
typedef struct timers_info timers_info_t |
|
static |
Configure network interface driver.
References ERR_OK, ethernetif_init(), gs_net_if, LWIP_ASSERT, netif_add(), netif_set_default(), netif_set_up(), NULL, printf, and status_callback().
Referenced by init_ethernet().
void ethernet_task | ( | void | ) |
Process incoming ethernet frames, then update timers.
References ethernetif_input(), gs_net_if, and timers_update().
Referenced by main().
void init_ethernet | ( | void | ) |
Initialize the lwIP TCP/IP stack with the network interface driver.
References ethernet_configure_interface(), lwip_init(), and sys_init_timing().
Referenced by main().
void status_callback | ( | struct netif * | netif | ) |
Callback function used to print the given IP address when the link is up.
netif | The network interface instance. |
References inet_ntoa(), netif::ip_addr, netif_is_up, and printf.
Referenced by ethernet_configure_interface().
|
static |
Timer management function.
References gs_timers_table, sys_get_ms(), timers_info::timer, timers_info::timer_func, and timers_info::timer_interval.
Referenced by ethernet_task().
struct netif gs_net_if |
Referenced by ethernet_configure_interface(), and ethernet_task().
|
static |
Referenced by timers_update().