From b940f6b9821fef7f9c100dfdeac86608f2c39d17 Mon Sep 17 00:00:00 2001 From: Ludwig Ortmann Date: Fri, 21 Nov 2014 18:27:55 +0100 Subject: [PATCH] drivers/cc2420: use DEBUG_ENABLED instead of DEBUG compare https://github.com/RIOT-OS/RIOT/issues/2067 --- drivers/cc2420/cc2420_rx.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/cc2420/cc2420_rx.c b/drivers/cc2420/cc2420_rx.c index 5c091f4953..707eb0d7f4 100644 --- a/drivers/cc2420/cc2420_rx.c +++ b/drivers/cc2420/cc2420_rx.c @@ -19,6 +19,11 @@ #include "kernel_types.h" #include "transceiver.h" #include "msg.h" + +#define ENABLE_DEBUG (0) +#if ENABLE_DEBUG +#define DEBUG_ENABLED +#endif #include "debug.h" /* circular buffer for incoming 802.15.4 packets */ @@ -73,7 +78,7 @@ void cc2420_rx_handler(void) /* follow-up to transceiver module if adequate */ if (cc2420_rx_buffer[rx_buffer_next].frame.fcf.frame_type != IEEE_802154_ACK_FRAME) { -#ifdef DEBUG +#ifdef DEBUG_ENABLED ieee802154_frame_print_fcf_frame(&cc2420_rx_buffer[rx_buffer_next].frame); #endif @@ -86,12 +91,11 @@ void cc2420_rx_handler(void) } } -#ifdef DEBUG +#ifdef DEBUG_ENABLED else { DEBUG("GOT ACK for SEQ %u\n", cc2420_rx_buffer[rx_buffer_next].frame.seq_nr); ieee802154_frame_print_fcf_frame(&cc2420_rx_buffer[rx_buffer_next].frame); } - #endif /* shift to next buffer element */