mbxxx contiki-main.c: include uip-debug, as uip_debug_lladdr_print is used in main

This commit is contained in:
Simon Duquennoy 2015-10-01 15:26:40 +02:00
parent 16dd3af1e6
commit fcd0302d02

View File

@ -76,18 +76,8 @@
#include "net/ipv6/uip-ds6.h" #include "net/ipv6/uip-ds6.h"
#endif /* NETSTACK_CONF_WITH_IPV6 */ #endif /* NETSTACK_CONF_WITH_IPV6 */
#define DEBUG 1 #define DEBUG DEBUG_PRINT
#if DEBUG #include "net/ip/uip-debug.h"
#include <stdio.h>
#define PRINTF(...) printf(__VA_ARGS__)
#define PRINT6ADDR(addr) PRINTF(" %02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x ", ((uint8_t *)addr)[0], ((uint8_t *)addr)[1], ((uint8_t *)addr)[2], ((uint8_t *)addr)[3], ((uint8_t *)addr)[4], ((uint8_t *)addr)[5], ((uint8_t *)addr)[6], ((uint8_t *)addr)[7], ((uint8_t *)addr)[8], ((uint8_t *)addr)[9], ((uint8_t *)addr)[10], ((uint8_t *)addr)[11], ((uint8_t *)addr)[12], ((uint8_t *)addr)[13], ((uint8_t *)addr)[14], ((uint8_t *)addr)[15])
#define PRINTLLADDR(lladdr) PRINTF(" %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x ",lladdr.u8[0], lladdr.u8[1], lladdr.u8[2], lladdr.u8[3],lladdr.u8[4], lladdr.u8[5], lladdr.u8[6], lladdr.u8[7])
#else
#define PRINTF(...)
#define PRINT6ADDR(addr)
#define PRINTLLADDR(addr)
#endif
#if NETSTACK_CONF_WITH_IPV6 #if NETSTACK_CONF_WITH_IPV6
PROCINIT(&tcpip_process, &sensors_process); PROCINIT(&tcpip_process, &sensors_process);
@ -189,7 +179,7 @@ main(void)
NETSTACK_RDC.channel_check_interval())); NETSTACK_RDC.channel_check_interval()));
printf("802.15.4 PAN ID 0x%x, EUI-%d:", printf("802.15.4 PAN ID 0x%x, EUI-%d:",
IEEE802154_CONF_PANID, UIP_CONF_LL_802154?64:16); IEEE802154_CONF_PANID, UIP_CONF_LL_802154?64:16);
uip_debug_lladdr_print(&linkaddr_node_addr); uip_debug_lladdr_print((const uip_lladdr_t *)&linkaddr_node_addr);
printf(", radio channel %u\n", RF_CHANNEL); printf(", radio channel %u\n", RF_CHANNEL);
procinit_init(); procinit_init();