Atmel Software Framework

thirdparty/freertos/demo/lwip_avr32_uc3_dhcp_example/network/ethernet.c File Reference
#include <string.h>
#include "gpio.h"
#include "FreeRTOS.h"
#include "task.h"
#include "partest.h"
#include "conf_lwip_threads.h"
#include "ethernet.h"
#include "conf_eth.h"
#include "macb.h"
#include "displayTask.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"

Functions

void dns_found (const char *name, struct ip_addr *addr, void *arg)
 
 portTASK_FUNCTION (vStartEthernetTask, pvParameters)
 create ethernet task, for ethernet management. More...
 
static void prvEthernetConfigureInterface (void *param)
 set ethernet config 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 MACB_if
 

void dns_found ( const char *  name,
struct ip_addr *  addr,
void *  arg 
)
portTASK_FUNCTION ( vStartEthernetTask  ,
pvParameters   
)

create ethernet task, for ethernet management.

configure lwIP and MACB, start lwIP layer, start servers tasks through lwIP services.

Parameters
uxPriorityInput. priority for the task, it should be low

References gpio_enable_module(), lwipBASIC_SMTP_CLIENT_PRIORITY, lwipBASIC_SMTP_CLIENT_STACK_SIZE, lwipBASIC_TFTP_SERVER_PRIORITY, lwipBASIC_TFTP_SERVER_STACK_SIZE, lwipBASIC_WEB_SERVER_PRIORITY, lwipBASIC_WEB_SERVER_STACK_SIZE, NULL, prvlwIPInit(), sys_thread_new(), and vTaskDelete().

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

References netif::ip_addr, netif_is_up, and sendMessage().

Referenced by prvEthernetConfigureInterface().

static void tcpip_init_done ( void *  arg)
static

Callback executed when the TCP/IP init is done.

References NULL, prvEthernetConfigureInterface(), 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 xTaskCreate.

struct netif MACB_if