Moved all uIP initialization into network initialization code

This commit is contained in:
adamdunkels 2007-03-15 21:53:15 +00:00
parent 3000eeaaaa
commit de3cc062fc
2 changed files with 7 additions and 7 deletions

View file

@ -28,13 +28,13 @@
*
* This file is part of the Contiki operating system.
*
* @(#)$Id: contiki-esb-default-init-net.c,v 1.3 2006/10/06 07:49:31 adamdunkels Exp $
* @(#)$Id: contiki-esb-default-init-net.c,v 1.4 2007/03/15 21:53:15 adamdunkels Exp $
*/
#include "contiki-esb.h"
static struct uip_fw_netif tr1001if =
{UIP_FW_NETIF(0,0,0,0, 0,0,0,0, tr1001_drv_send)};
{UIP_FW_NETIF(0,0,0,0, 0,0,0,0, tr1001_uip_send)};
static struct uip_fw_netif slipif =
{UIP_FW_NETIF(172,16,0,0, 255,255,255,0, slip_send)};
@ -51,9 +51,10 @@ init_net(void)
rs232_set_input(slip_input_byte);
tr1001_init();
process_start(&tr1001_drv_process, NULL);
process_start(&tr1001_uip_process, NULL);
process_start(&slip_process, NULL);
process_start(&uip_fw_process, NULL);
process_start(&tcpip_process, NULL);
if (NODE_ID > 0) {
/* node id is set, construct an ip address based on the node id */

View file

@ -28,7 +28,7 @@
*
* This file is part of the Contiki operating system.
*
* @(#)$Id: contiki-esb-main.c,v 1.3 2006/10/09 09:19:02 nifi Exp $
* @(#)$Id: contiki-esb-main.c,v 1.4 2007/03/15 21:53:15 adamdunkels Exp $
*/
#include <io.h>
@ -47,7 +47,7 @@ SENSORS(&button_sensor, &sound_sensor, &vib_sensor,
&temperature_sensor);
PROCINIT(&sensors_process, &ir_process, &etimer_process,
&tcpip_process, &uip_fw_process, &cfs_eeprom_process);
&cfs_eeprom_process);
#define ENABLE_AUTOSTART 0
@ -76,7 +76,6 @@ PROCESS_THREAD(contiki_esb_main_init_process, ev, data)
clock_delay(100);
leds_off(LEDS_ALL);
PROCESS_END();
}
/*---------------------------------------------------------------------------*/