From 9475737f4bfe6868f9584d9812d1aea42c5303a4 Mon Sep 17 00:00:00 2001 From: Vasilis Michopoulos Date: Tue, 27 Mar 2012 15:58:50 +0100 Subject: [PATCH] Changed some sensinode/cc2530 examples to use uip-debug.h instead of the old #define DEBUG N --- examples/cc2530dk/udp-ipv6/ping6.c | 12 ++---------- examples/sensinode/udp-ipv6/ping6.c | 12 ++---------- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/examples/cc2530dk/udp-ipv6/ping6.c b/examples/cc2530dk/udp-ipv6/ping6.c index f4cc073ab..ae2a2b59a 100644 --- a/examples/cc2530dk/udp-ipv6/ping6.c +++ b/examples/cc2530dk/udp-ipv6/ping6.c @@ -36,16 +36,8 @@ #include "dev/button-sensor.h" #include "debug.h" -#define DEBUG 1 -#if DEBUG -#include -#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 ", ((u8_t *)addr)[0], ((u8_t *)addr)[1], ((u8_t *)addr)[2], ((u8_t *)addr)[3], ((u8_t *)addr)[4], ((u8_t *)addr)[5], ((u8_t *)addr)[6], ((u8_t *)addr)[7], ((u8_t *)addr)[8], ((u8_t *)addr)[9], ((u8_t *)addr)[10], ((u8_t *)addr)[11], ((u8_t *)addr)[12], ((u8_t *)addr)[13], ((u8_t *)addr)[14], ((u8_t *)addr)[15]) -#define PRINTLLADDR(lladdr) PRINTF(" %02x:%02x:%02x:%02x:%02x:%02x ",lladdr->addr[0], lladdr->addr[1], lladdr->addr[2], lladdr->addr[3],lladdr->addr[4], lladdr->addr[5]) -#else -#define PRINTF(...) -#define PRINT6ADDR(addr) -#endif +#define DEBUG DEBUG_NONE +#include "net/uip-debug.h" #define PING6_NB 5 #define PING6_DATALEN 16 diff --git a/examples/sensinode/udp-ipv6/ping6.c b/examples/sensinode/udp-ipv6/ping6.c index a88ebc7dc..611cae02a 100644 --- a/examples/sensinode/udp-ipv6/ping6.c +++ b/examples/sensinode/udp-ipv6/ping6.c @@ -38,16 +38,8 @@ #include "sensinode-debug.h" #endif -#define DEBUG 0 -#if DEBUG -#include -#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 ", ((u8_t *)addr)[0], ((u8_t *)addr)[1], ((u8_t *)addr)[2], ((u8_t *)addr)[3], ((u8_t *)addr)[4], ((u8_t *)addr)[5], ((u8_t *)addr)[6], ((u8_t *)addr)[7], ((u8_t *)addr)[8], ((u8_t *)addr)[9], ((u8_t *)addr)[10], ((u8_t *)addr)[11], ((u8_t *)addr)[12], ((u8_t *)addr)[13], ((u8_t *)addr)[14], ((u8_t *)addr)[15]) -#define PRINTLLADDR(lladdr) PRINTF(" %02x:%02x:%02x:%02x:%02x:%02x ",lladdr->addr[0], lladdr->addr[1], lladdr->addr[2], lladdr->addr[3],lladdr->addr[4], lladdr->addr[5]) -#else -#define PRINTF(...) -#define PRINT6ADDR(addr) -#endif +#define DEBUG DEBUG_NONE +#include "net/uip-debug.h" #define PING6_NB 5 #define PING6_DATALEN 16