Use the common netstack_init
This commit is contained in:
parent
5cf3b83733
commit
fa4d4db329
3 changed files with 8 additions and 13 deletions
|
@ -28,7 +28,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* @(#)$Id: contiki-esb-default-init-net.c,v 1.13 2009/07/07 13:06:56 nifi Exp $
|
||||
* @(#)$Id: contiki-esb-default-init-net.c,v 1.14 2010/02/18 23:19:03 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
#include "contiki-conf.h"
|
||||
|
@ -55,8 +55,8 @@ init_net(void)
|
|||
rimeaddr_t rimeaddr;
|
||||
int i;
|
||||
|
||||
tr1001_init();
|
||||
rime_init(MAC_DRIVER.init(&tr1001_driver));
|
||||
netstack_init();
|
||||
|
||||
rimeaddr.u8[0] = node_id & 0xff;
|
||||
rimeaddr.u8[1] = node_id >> 8;
|
||||
rimeaddr_set_node_addr(&rimeaddr);
|
||||
|
|
|
@ -56,12 +56,9 @@ void
|
|||
init_net(void)
|
||||
{
|
||||
rimeaddr_t rimeaddr;
|
||||
cc2420_init();
|
||||
cc2420_set_channel(RF_CHANNEL);
|
||||
|
||||
NETSTACK_RDC.init();
|
||||
NETSTACK_MAC.init();
|
||||
NETSTACK_NETWORK.init();
|
||||
netstack_init();
|
||||
cc2420_set_channel(RF_CHANNEL);
|
||||
|
||||
rimeaddr.u8[0] = node_id & 0xff;
|
||||
rimeaddr.u8[1] = node_id >> 8;
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
*
|
||||
* Author: Adam Dunkels <adam@sics.se>
|
||||
*
|
||||
* $Id: contiki-main.c,v 1.34 2010/02/18 23:10:06 adamdunkels Exp $
|
||||
* $Id: contiki-main.c,v 1.35 2010/02/18 23:19:03 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
#include "contiki.h"
|
||||
|
@ -127,11 +127,9 @@ contiki_main(int flag)
|
|||
|
||||
ctimer_init();
|
||||
|
||||
NETSTACK_RDC.init();
|
||||
NETSTACK_MAC.init();
|
||||
NETSTACK_NETWORK.init();
|
||||
netstack_init();
|
||||
|
||||
uip_over_mesh_init(2);
|
||||
uip_over_mesh_init(2);
|
||||
uip_over_mesh_set_net(&meshif.ipaddr, &meshif.netmask);
|
||||
|
||||
if(flag == 1) {
|
||||
|
|
Loading…
Reference in a new issue