11 #include "dev/models.h"
18 unsigned short node_id = 0;
22 print_processes(
struct process *
const processes[])
25 while(*processes !=
NULL) {
26 printf(
" '%s'", (*processes)->name);
43 for(k = 0; k < 400; ++k) {
44 j = k > 200? 400 - k: k;
47 for(i = 0; i < j; ++i) {
51 for(i = 0; i < 200 - j; ++i) {
62 uint8_t *addr_long =
NULL;
63 uint16_t addr_short = 0;
72 printf(
"Read MAC from flash: %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n",
73 ft_buffer[0], ft_buffer[1], ft_buffer[2], ft_buffer[3],
74 ft_buffer[4], ft_buffer[5], ft_buffer[6], ft_buffer[7]);
76 memset(&addr, 0,
sizeof(rimeaddr_t));
79 memcpy(addr.u8, ft_buffer,
sizeof(addr.u8));
82 for(i = 0; i <
sizeof(rimeaddr_t); ++i) {
83 addr.u8[i] = ft_buffer[7 - i];
86 printf(
"Setting manual address from node_id\n");
87 addr.u8[1] = node_id >> 8;
88 addr.u8[0] = node_id & 0xff;
93 printf(
"Rime configured with address ");
94 for(i = (
sizeof(addr.u8)) - 1; i > 0; i--) {
95 printf(
"%02x:", addr.u8[i]);
97 printf(
"%02x\n", addr.u8[i]);
100 if (
sizeof(addr.u8) == 6)
101 addr_long = (uint8_t *) addr.u8;
103 addr_short = (addr.u8[1] * 256) + addr.u8[0];
119 uart1_set_input(serial_line_input_byte);
126 printf(
"\n" CONTIKI_VERSION_STRING
" started\n");
127 printf(
"model: " SENSINODE_MODEL
"\n\n");
132 rime_init(sicslowmac_init(&cc2430_rf_driver));
140 autostart_start(autostart_processes);