using DEBUGF where reasonable
This commit is contained in:
parent
20b5230466
commit
1c67af2ddd
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
#include "demo.h"
|
#include "demo.h"
|
||||||
|
|
||||||
#define ENABLE_DEBUG (1)
|
#define ENABLE_DEBUG (0)
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
#define LL_HDR_LEN (0x4)
|
#define LL_HDR_LEN (0x4)
|
||||||
@ -69,7 +69,7 @@ void rpl_udp_monitor(void)
|
|||||||
if (m.type == PKT_PENDING) {
|
if (m.type == PKT_PENDING) {
|
||||||
p = (radio_packet_t *) m.content.ptr;
|
p = (radio_packet_t *) m.content.ptr;
|
||||||
|
|
||||||
DEBUG("Received packet from ID %u\n", p->src);
|
DEBUGF("Received packet from ID %u\n", p->src);
|
||||||
DEBUG("\tLength:\t%u\n", p->length);
|
DEBUG("\tLength:\t%u\n", p->length);
|
||||||
DEBUG("\tSrc:\t%u\n", p->src);
|
DEBUG("\tSrc:\t%u\n", p->src);
|
||||||
DEBUG("\tDst:\t%u\n", p->dst);
|
DEBUG("\tDst:\t%u\n", p->dst);
|
||||||
|
|||||||
@ -68,10 +68,10 @@ void rpl_udp_init(int argc, char **argv)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG("%s, %d: Setting HW address to %u\n", __FILE__, __LINE__, id);
|
DEBUGF("Setting HW address to %u\n", id);
|
||||||
net_if_set_hardware_address(0, id);
|
net_if_set_hardware_address(0, id);
|
||||||
|
|
||||||
DEBUG("%s, %d: Initializing RPL for interface 0\n", __FILE__, __LINE__);
|
DEBUGF("Initializing RPL for interface 0\n");
|
||||||
state = rpl_init(0);
|
state = rpl_init(0);
|
||||||
|
|
||||||
if (state != SIXLOWERROR_SUCCESS) {
|
if (state != SIXLOWERROR_SUCCESS) {
|
||||||
@ -89,9 +89,9 @@ void rpl_udp_init(int argc, char **argv)
|
|||||||
ipv6_iface_set_routing_provider(rpl_get_next_hop);
|
ipv6_iface_set_routing_provider(rpl_get_next_hop);
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG("%s, %d: Start monitor\n", __FILE__, __LINE__);
|
DEBUGF("Start monitor\n");
|
||||||
int monitor_pid = thread_create(monitor_stack_buffer, MONITOR_STACK_SIZE, PRIORITY_MAIN - 2, CREATE_STACKTEST, rpl_udp_monitor, "monitor");
|
int monitor_pid = thread_create(monitor_stack_buffer, MONITOR_STACK_SIZE, PRIORITY_MAIN - 2, CREATE_STACKTEST, rpl_udp_monitor, "monitor");
|
||||||
DEBUG("%s, %d: Register at transceiver %02X\n", __FILE__, __LINE__, TRANSCEIVER);
|
DEBUGF("Register at transceiver %02X\n", TRANSCEIVER);
|
||||||
transceiver_register(TRANSCEIVER, monitor_pid);
|
transceiver_register(TRANSCEIVER, monitor_pid);
|
||||||
ipv6_register_packet_handler(monitor_pid);
|
ipv6_register_packet_handler(monitor_pid);
|
||||||
//sixlowpan_lowpan_register(monitor_pid);
|
//sixlowpan_lowpan_register(monitor_pid);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user