Microchip® Advanced Software Framework

ethernet.c File Reference

Ethernet management for the FreeRTOS with lwIP example.

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

#include <string.h>
#include "FreeRTOS.h"
#include "task.h"
#include "partest.h"
#include "conf_lwip_threads.h"
#include "ethernet.h"
#include "netif/ethernetif.h"
#include "conf_eth.h"
#include "emac.h"
#include "ethernet_phy.h"
#include "BasicWEB.h"
#include "BasicTFTP.h"
#include "lwip/sys.h"
#include "lwip/api.h"
#include "lwip/tcpip.h"
#include "lwip/memp.h"
#include <lwip/dhcp.h>
#include <lwip/dns.h>
#include <lwip/netif.h>
#include "lwip/stats.h"
#include "lwip/init.h"
#include "lwip/inet.h"

Data Structures

struct  timers_info
 

Typedefs

typedef struct timers_info timers_info_t
 

Functions

static void ethernet_configure_interface (void)
 Set ethernet config. More...
 
 portTASK_FUNCTION (vStartEthernetTask, pvParameters)
 create ethernet task, for ethernet management. More...
 
static void prvlwIPInit (void)
 start lwIP layer. More...
 
void status_callback (struct netif *netif)
 Status callback used to print address given by DHCP. More...
 
static void tcpip_init_done (void *arg)
 Callback executed when the TCP/IP init is done. More...
 
void vStartEthernetTaskLauncher (unsigned portBASE_TYPE uxPriority)
 Create the vStartEthernetTask task. More...
 

Variables

struct netif gs_net_if
 

typedef struct timers_info timers_info_t

portTASK_FUNCTION ( vStartEthernetTask  ,
pvParameters   
)
static void prvlwIPInit ( void  )
static

start lwIP layer.

References sys_sem_free(), sys_sem_new(), sys_sem_wait, tcpip_init(), and tcpip_init_done().

Referenced by portTASK_FUNCTION().

void status_callback ( struct netif netif)

Status callback used to print address given by DHCP.

Parameters
netifInstance to network interface.

References inet_ntoa, netif::ip_addr, and netif_is_up.

Referenced by ethernet_configure_interface(), and netif_set_status_callback().

static void tcpip_init_done ( void arg)
static

Callback executed when the TCP/IP init is done.

References ethernet_configure_interface(), and sys_sem_signal().

Referenced by prvlwIPInit().

void vStartEthernetTaskLauncher ( unsigned portBASE_TYPE  uxPriority)

Create the vStartEthernetTask task.

Parameters
uxPriorityInput; priority of the task to create.

References configMINIMAL_STACK_SIZE, NULL, and xTaskHandle.

Referenced by main().

struct netif gs_net_if