moved debug macros from header to source.
This commit is contained in:
parent
545c0c506e
commit
b91b2c1b2d
@ -28,7 +28,7 @@
|
||||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: deluge.c,v 1.3 2009/02/27 14:28:02 nvt-se Exp $
|
||||
* $Id: deluge.c,v 1.4 2009/03/01 12:49:43 nvt-se Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -41,8 +41,6 @@
|
||||
* Nicolas Tsiftes <nvt@sics.se>
|
||||
*/
|
||||
|
||||
#define DEBUG 0
|
||||
|
||||
#include "contiki.h"
|
||||
#include "net/rime.h"
|
||||
#include "net/rime/ctimer.h"
|
||||
@ -62,6 +60,18 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define DEBUG 1
|
||||
#if DEBUG
|
||||
#include <stdio.h>
|
||||
#define PRINTF(...) \
|
||||
do { \
|
||||
printf("[Node %02u] ", (unsigned) node_id); \
|
||||
printf(__VA_ARGS__); \
|
||||
} while (0)
|
||||
#else
|
||||
#define PRINTF(...)
|
||||
#endif
|
||||
|
||||
PROCESS(deluge_process, "Deluge process");
|
||||
|
||||
static void broadcast_recv(struct broadcast_conn *, rimeaddr_t *);
|
||||
|
@ -28,7 +28,7 @@
|
||||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: deluge.h,v 1.2 2009/02/25 17:09:55 nvt-se Exp $
|
||||
* $Id: deluge.h,v 1.3 2009/03/01 12:49:43 nvt-se Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -45,17 +45,6 @@
|
||||
|
||||
PROCESS_NAME(deluge_process);
|
||||
|
||||
#if DEBUG
|
||||
#include <stdio.h>
|
||||
#define PRINTF(...) \
|
||||
do { \
|
||||
printf("[Node %02u] ", (unsigned) node_id); \
|
||||
printf(__VA_ARGS__); \
|
||||
} while (0)
|
||||
#else
|
||||
#define PRINTF(...)
|
||||
#endif
|
||||
|
||||
#define LONG_TIMER(et, counter, time) \
|
||||
do { \
|
||||
for (counter = 0; counter < time; counter++) { \
|
||||
|
Loading…
Reference in New Issue
Block a user