mirror of
https://github.com/ep00ch/lwip-contrib-mac.git
synced 2024-10-12 08:23:42 +00:00
some updates and cleanups
This commit is contained in:
parent
056badf0bd
commit
3ee681876e
@ -30,11 +30,11 @@
|
|||||||
*
|
*
|
||||||
* Author: Adam Dunkels <adam@sics.se>
|
* Author: Adam Dunkels <adam@sics.se>
|
||||||
*
|
*
|
||||||
* $Id: cc.h,v 1.1 2003/02/28 14:29:13 jani Exp $
|
|
||||||
*/
|
*/
|
||||||
#ifndef __ARCH_CC_H__
|
#ifndef __ARCH_CC_H__
|
||||||
#define __ARCH_CC_H__
|
#define __ARCH_CC_H__
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
#include <cyg/error/codes.h>
|
#include <cyg/error/codes.h>
|
||||||
#include <cyg/infra/cyg_type.h>
|
#include <cyg/infra/cyg_type.h>
|
||||||
#if (CYG_BYTEORDER == CYG_LSBFIRST)
|
#if (CYG_BYTEORDER == CYG_LSBFIRST)
|
||||||
|
@ -30,7 +30,6 @@
|
|||||||
*
|
*
|
||||||
* Author: Adam Dunkels <adam@sics.se>
|
* Author: Adam Dunkels <adam@sics.se>
|
||||||
*
|
*
|
||||||
* $Id: perf.h,v 1.1 2003/02/28 14:29:13 jani Exp $
|
|
||||||
*/
|
*/
|
||||||
#ifndef __PERF_H__
|
#ifndef __PERF_H__
|
||||||
#define __PERF_H__
|
#define __PERF_H__
|
||||||
|
@ -30,12 +30,12 @@
|
|||||||
*
|
*
|
||||||
* Author: Adam Dunkels <adam@sics.se>
|
* Author: Adam Dunkels <adam@sics.se>
|
||||||
*
|
*
|
||||||
* $Id: lwipopts.h,v 1.1 2003/02/28 14:29:13 jani Exp $
|
|
||||||
*/
|
*/
|
||||||
#ifndef __LWIPOPTS_H__
|
#ifndef __LWIPOPTS_H__
|
||||||
#define __LWIPOPTS_H__
|
#define __LWIPOPTS_H__
|
||||||
/*include the configuration made with configtool*/
|
/*include the configuration made with configtool*/
|
||||||
#include <pkgconf/net_lwip.h>
|
#include <pkgconf/net_lwip.h>
|
||||||
|
#define TCPIP_THREAD_PRIO 7
|
||||||
/* ---------- Memory options ---------- */
|
/* ---------- Memory options ---------- */
|
||||||
/* MEM_ALIGNMENT: should be set to the alignment of the CPU for which
|
/* MEM_ALIGNMENT: should be set to the alignment of the CPU for which
|
||||||
lwIP is compiled. 4 byte alignment -> define MEM_ALIGNMENT to 4, 2
|
lwIP is compiled. 4 byte alignment -> define MEM_ALIGNMENT to 4, 2
|
||||||
@ -154,22 +154,16 @@ a lot of data that needs to be copied, this should be set high. */
|
|||||||
#define LWIP_UDP CYGPKG_LWIP_UDP
|
#define LWIP_UDP CYGPKG_LWIP_UDP
|
||||||
#define UDP_TTL CYGPKG_LWIP_UDP_TTL
|
#define UDP_TTL CYGPKG_LWIP_UDP_TTL
|
||||||
|
|
||||||
#define LWIP_SLIP CYGPKG_LWIP_SLIP
|
/* ---------- SLIP options --------- */
|
||||||
|
#define LWIP_SLIP defined(CYGPKG_LWIP_SLIP)
|
||||||
#define SLIP_DEV CYGPKG_LWIP_SLIP_DEV
|
#define SLIP_DEV CYGPKG_LWIP_SLIP_DEV
|
||||||
|
|
||||||
/* ---------- Statistics options ---------- */
|
/* ---------- PPP options --------- */
|
||||||
#define STATS
|
#define PPP_SUPPORT defined(CYGPKG_LWIP_PPP)
|
||||||
|
#define PPP_DEV CYGPKG_LWIP_PPP_DEV
|
||||||
|
#define MD5_SUPPORT 1
|
||||||
|
#define PAP_SUPPORT 1
|
||||||
|
|
||||||
#ifdef STATS
|
/* ---------- Statistics options ---------- */
|
||||||
#define LINK_STATS
|
|
||||||
#define IP_STATS
|
|
||||||
#define ICMP_STATS
|
|
||||||
#define UDP_STATS
|
|
||||||
#define TCP_STATS
|
|
||||||
#define MEM_STATS
|
|
||||||
#define MEMP_STATS
|
|
||||||
#define PBUF_STATS
|
|
||||||
#define SYS_STATS
|
|
||||||
#endif /* STATS */
|
|
||||||
|
|
||||||
#endif /* __LWIPOPTS_H__ */
|
#endif /* __LWIPOPTS_H__ */
|
||||||
|
@ -2,16 +2,20 @@
|
|||||||
* init.c - helper code for initing applications that use lwIP
|
* init.c - helper code for initing applications that use lwIP
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "lwip/mem.h"
|
#include "lwip/opt.h"
|
||||||
#include "lwip/memp.h"
|
|
||||||
#include "lwip/sys.h"
|
#include "lwip/sys.h"
|
||||||
|
#include "lwip/memp.h"
|
||||||
#include "lwip/tcpip.h"
|
#include "lwip/tcpip.h"
|
||||||
#include "lwip/ip_addr.h"
|
#include "lwip/ip_addr.h"
|
||||||
#include "lwipopts.h"
|
|
||||||
|
|
||||||
#if LWIP_DHCP
|
#if LWIP_DHCP
|
||||||
#include "lwip/dhcp.h"
|
#include "lwip/dhcp.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if LWIP_SLIP
|
||||||
|
#include "netif/slipif.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "netif/etharp.h"
|
#include "netif/etharp.h"
|
||||||
|
|
||||||
#include <cyg/io/eth/eth_drv.h>
|
#include <cyg/io/eth/eth_drv.h>
|
||||||
@ -32,14 +36,16 @@ void tcpip_init_done(void * arg)
|
|||||||
sys_sem_t *sem = arg;
|
sys_sem_t *sem = arg;
|
||||||
sys_sem_signal(*sem);
|
sys_sem_signal(*sem);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct netif mynetif;
|
struct netif mynetif;
|
||||||
|
static void ecosglue_init(void);
|
||||||
|
void lwip_set_addr(struct netif *netif);
|
||||||
#if PPP_SUPPORT
|
#if PPP_SUPPORT
|
||||||
void pppMyCallback(void *a , int e)
|
void pppMyCallback(void *a , int e)
|
||||||
{
|
{
|
||||||
diag_printf("callback %d \n",e);
|
diag_printf("callback %d \n",e);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
extern err_t ecosif_init(struct netif *);
|
|
||||||
/*
|
/*
|
||||||
* Called by the eCos application at startup
|
* Called by the eCos application at startup
|
||||||
* wraps various init calls
|
* wraps various init calls
|
||||||
@ -71,7 +77,6 @@ void lwip_init(void)
|
|||||||
#else
|
#else
|
||||||
ecosglue_init();
|
ecosglue_init();
|
||||||
#endif
|
#endif
|
||||||
// ecosif_init(&mynetif);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void lwip_set_addr(struct netif *netif)
|
void lwip_set_addr(struct netif *netif)
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
/* Serial operations for SLIP */
|
/* Serial operations for SLIP */
|
||||||
|
|
||||||
#include "lwip/debug.h"
|
#include "lwip/opt.h"
|
||||||
#include "lwip/def.h"
|
#include "lwip/def.h"
|
||||||
#include "lwip/sys.h"
|
#include "lwip/sys.h"
|
||||||
#include "lwip/netif.h"
|
#include "lwip/netif.h"
|
||||||
#include "lwipopts.h"
|
|
||||||
|
|
||||||
#include <cyg/io/io.h>
|
#include <cyg/io/io.h>
|
||||||
#include <cyg/io/config_keys.h>
|
#include <cyg/io/config_keys.h>
|
||||||
@ -44,8 +43,8 @@ void * sio_open(int devnum)
|
|||||||
{
|
{
|
||||||
int res;
|
int res;
|
||||||
cyg_uint32 nb = 0;
|
cyg_uint32 nb = 0;
|
||||||
|
|
||||||
char siodev[] = "/dev/serX";
|
char siodev[] = "/dev/serX";
|
||||||
|
|
||||||
if (devnum < 0 || devnum >9)
|
if (devnum < 0 || devnum >9)
|
||||||
return NULL;
|
return NULL;
|
||||||
siodev[8] = '0' + devnum;
|
siodev[8] = '0' + devnum;
|
||||||
|
@ -2,11 +2,10 @@
|
|||||||
* This file implements the eCos specific sys_arch functions used by lwIP
|
* This file implements the eCos specific sys_arch functions used by lwIP
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "lwipopts.h"
|
#include "lwip/opt.h"
|
||||||
#include "arch/sys_arch.h"
|
#include "arch/sys_arch.h"
|
||||||
#include "lwip/sys.h"
|
#include "lwip/sys.h"
|
||||||
#include "lwip/def.h"
|
#include "lwip/def.h"
|
||||||
#include "lwip/debug.h"
|
|
||||||
|
|
||||||
//FIXME use CYG_HWR_whatever for RTC
|
//FIXME use CYG_HWR_whatever for RTC
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user