some updates and cleanups

This commit is contained in:
jani 2003-04-30 15:17:07 +00:00
parent 056badf0bd
commit 3ee681876e
6 changed files with 25 additions and 29 deletions

View File

@ -30,11 +30,11 @@
*
* Author: Adam Dunkels <adam@sics.se>
*
* $Id: cc.h,v 1.1 2003/02/28 14:29:13 jani Exp $
*/
#ifndef __ARCH_CC_H__
#define __ARCH_CC_H__
#include <string.h>
#include <cyg/error/codes.h>
#include <cyg/infra/cyg_type.h>
#if (CYG_BYTEORDER == CYG_LSBFIRST)

View File

@ -30,7 +30,6 @@
*
* Author: Adam Dunkels <adam@sics.se>
*
* $Id: perf.h,v 1.1 2003/02/28 14:29:13 jani Exp $
*/
#ifndef __PERF_H__
#define __PERF_H__

View File

@ -30,12 +30,12 @@
*
* Author: Adam Dunkels <adam@sics.se>
*
* $Id: lwipopts.h,v 1.1 2003/02/28 14:29:13 jani Exp $
*/
#ifndef __LWIPOPTS_H__
#define __LWIPOPTS_H__
/*include the configuration made with configtool*/
#include <pkgconf/net_lwip.h>
#define TCPIP_THREAD_PRIO 7
/* ---------- Memory options ---------- */
/* 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
@ -153,23 +153,17 @@ a lot of data that needs to be copied, this should be set high. */
/* ---------- UDP options ---------- */
#define LWIP_UDP CYGPKG_LWIP_UDP
#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
/* ---------- Statistics options ---------- */
#define STATS
/* ---------- PPP options --------- */
#define PPP_SUPPORT defined(CYGPKG_LWIP_PPP)
#define PPP_DEV CYGPKG_LWIP_PPP_DEV
#define MD5_SUPPORT 1
#define PAP_SUPPORT 1
#ifdef STATS
#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 */
/* ---------- Statistics options ---------- */
#endif /* __LWIPOPTS_H__ */

View File

@ -2,16 +2,20 @@
* init.c - helper code for initing applications that use lwIP
*/
#include "lwip/mem.h"
#include "lwip/memp.h"
#include "lwip/opt.h"
#include "lwip/sys.h"
#include "lwip/memp.h"
#include "lwip/tcpip.h"
#include "lwip/ip_addr.h"
#include "lwipopts.h"
#if LWIP_DHCP
#include "lwip/dhcp.h"
#endif
#if LWIP_SLIP
#include "netif/slipif.h"
#endif
#include "netif/etharp.h"
#include <cyg/io/eth/eth_drv.h>
@ -31,15 +35,17 @@ void tcpip_init_done(void * arg)
{
sys_sem_t *sem = arg;
sys_sem_signal(*sem);
}
}
struct netif mynetif;
static void ecosglue_init(void);
void lwip_set_addr(struct netif *netif);
#if PPP_SUPPORT
void pppMyCallback(void *a , int e)
{
diag_printf("callback %d \n",e);
}
#endif
extern err_t ecosif_init(struct netif *);
/*
* Called by the eCos application at startup
* wraps various init calls
@ -71,7 +77,6 @@ void lwip_init(void)
#else
ecosglue_init();
#endif
// ecosif_init(&mynetif);
}
void lwip_set_addr(struct netif *netif)

View File

@ -1,10 +1,9 @@
/* Serial operations for SLIP */
#include "lwip/debug.h"
#include "lwip/opt.h"
#include "lwip/def.h"
#include "lwip/sys.h"
#include "lwip/netif.h"
#include "lwipopts.h"
#include <cyg/io/io.h>
#include <cyg/io/config_keys.h>
@ -44,8 +43,8 @@ void * sio_open(int devnum)
{
int res;
cyg_uint32 nb = 0;
char siodev[] = "/dev/serX";
if (devnum < 0 || devnum >9)
return NULL;
siodev[8] = '0' + devnum;

View File

@ -2,11 +2,10 @@
* 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 "lwip/sys.h"
#include "lwip/def.h"
#include "lwip/debug.h"
//FIXME use CYG_HWR_whatever for RTC