mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-11-10 21:05:04 +00:00
moving radio init to init-net files
This commit is contained in:
parent
d0997c2dab
commit
d8f6f03edc
@ -98,8 +98,6 @@ main(void)
|
|||||||
/* System services */
|
/* System services */
|
||||||
process_start(&etimer_process, NULL);
|
process_start(&etimer_process, NULL);
|
||||||
|
|
||||||
cc1020_init(cc1020_config_19200);
|
|
||||||
|
|
||||||
node_id_restore();
|
node_id_restore();
|
||||||
|
|
||||||
init_net();
|
init_net();
|
||||||
|
@ -42,12 +42,14 @@
|
|||||||
#include "dev/cc1020.h"
|
#include "dev/cc1020.h"
|
||||||
#include "net/mac/nullmac.h"
|
#include "net/mac/nullmac.h"
|
||||||
#include "net/rime.h"
|
#include "net/rime.h"
|
||||||
|
#include "contiki-msb430.h"
|
||||||
|
|
||||||
void
|
void
|
||||||
init_net(void)
|
init_net(void)
|
||||||
{
|
{
|
||||||
rimeaddr_t rimeaddr;
|
rimeaddr_t rimeaddr;
|
||||||
|
|
||||||
|
cc1020_init(cc1020_config_19200);
|
||||||
rime_init(nullmac_init(&cc1020_driver));
|
rime_init(nullmac_init(&cc1020_driver));
|
||||||
rimeaddr.u16[0] = node_id;
|
rimeaddr.u16[0] = node_id;
|
||||||
rimeaddr_set_node_addr(&rimeaddr);
|
rimeaddr_set_node_addr(&rimeaddr);
|
||||||
|
@ -42,6 +42,7 @@
|
|||||||
#include "node-id.h"
|
#include "node-id.h"
|
||||||
#include "dev/slip.h"
|
#include "dev/slip.h"
|
||||||
#include "dev/cc1020-uip.h"
|
#include "dev/cc1020-uip.h"
|
||||||
|
#include "contiki-msb430.h"
|
||||||
|
|
||||||
static struct uip_fw_netif slipif =
|
static struct uip_fw_netif slipif =
|
||||||
{UIP_FW_NETIF(172,16,0,0, 255,255,255,0, slip_send)};
|
{UIP_FW_NETIF(172,16,0,0, 255,255,255,0, slip_send)};
|
||||||
@ -53,6 +54,7 @@ void
|
|||||||
init_net(void)
|
init_net(void)
|
||||||
{
|
{
|
||||||
uip_ipaddr_t hostaddr;
|
uip_ipaddr_t hostaddr;
|
||||||
|
cc1020_init(cc1020_config_19200);
|
||||||
|
|
||||||
uip_init();
|
uip_init();
|
||||||
uip_fw_init();
|
uip_fw_init();
|
||||||
|
Loading…
Reference in New Issue
Block a user