moving radio init to init-net files

This commit is contained in:
fros4943 2007-12-20 13:43:24 +00:00
parent d0997c2dab
commit d8f6f03edc
3 changed files with 5 additions and 3 deletions

View file

@ -98,8 +98,6 @@ main(void)
/* System services */
process_start(&etimer_process, NULL);
cc1020_init(cc1020_config_19200);
node_id_restore();
init_net();

View file

@ -42,12 +42,14 @@
#include "dev/cc1020.h"
#include "net/mac/nullmac.h"
#include "net/rime.h"
#include "contiki-msb430.h"
void
init_net(void)
{
rimeaddr_t rimeaddr;
cc1020_init(cc1020_config_19200);
rime_init(nullmac_init(&cc1020_driver));
rimeaddr.u16[0] = node_id;
rimeaddr_set_node_addr(&rimeaddr);

View file

@ -42,6 +42,7 @@
#include "node-id.h"
#include "dev/slip.h"
#include "dev/cc1020-uip.h"
#include "contiki-msb430.h"
static struct uip_fw_netif slipif =
{UIP_FW_NETIF(172,16,0,0, 255,255,255,0, slip_send)};
@ -53,6 +54,7 @@ void
init_net(void)
{
uip_ipaddr_t hostaddr;
cc1020_init(cc1020_config_19200);
uip_init();
uip_fw_init();