Updated to match the new netstack api

This commit is contained in:
adamdunkels 2010-02-18 23:04:54 +00:00
parent 51980f0be4
commit 459c550cbd

View file

@ -43,7 +43,10 @@
#include "dev/cc2420.h"
#include "net/mac/nullmac.h"
#include "net/mac/lpp.h"
#include "net/mac/cxmac.h"
#include "net/mac/csma.h"
#include "net/rime.h"
#include "net/netstack.h"
#ifndef RF_CHANNEL
#define RF_CHANNEL 26
@ -55,11 +58,11 @@ init_net(void)
rimeaddr_t rimeaddr;
cc2420_init();
cc2420_set_channel(RF_CHANNEL);
#if WITH_NULLMAC
rime_init(nullmac_init(&cc2420_driver));
#else
rime_init(lpp_init(&cc2420_driver));
#endif
NETSTACK_RDC.init();
NETSTACK_MAC.init();
NETSTACK_NETWORK.init();
rimeaddr.u8[0] = node_id & 0xff;
rimeaddr.u8[1] = node_id >> 8;
rimeaddr_set_node_addr(&rimeaddr);