From f9d5c6e0b95e763fb9900e1e7cd5114bc452dfb9 Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Mon, 23 Aug 2010 00:38:04 +0200 Subject: [PATCH] remove DEBUG printouts from non-debug build --- bmc/bmc.c | 5 +---- bmc/chassis.c | 4 ++-- bmc/i2c.c | 2 ++ 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/bmc/bmc.c b/bmc/bmc.c index 99427f6..abe86e5 100644 --- a/bmc/bmc.c +++ b/bmc/bmc.c @@ -1,5 +1,6 @@ #include #include +#include #include #include #include "usart.h" @@ -16,12 +17,8 @@ int main(void) chassis_init(); usart_init(); - printf("\n"); - i2c_init(); - printf("Waiting for I2C...\n"); - sei(); while(1) { diff --git a/bmc/chassis.c b/bmc/chassis.c index 5bdad1f..fd48866 100644 --- a/bmc/chassis.c +++ b/bmc/chassis.c @@ -3,8 +3,6 @@ #include "chassis.h" -#define DEBUG - void chassis_init() { DDRB = 0xff; @@ -31,7 +29,9 @@ void chassis_control(unsigned char action) break; default: +#ifdef DEBUG printf("Unimplemented chassis action 0x%02x\n", action); +#endif break; } } diff --git a/bmc/i2c.c b/bmc/i2c.c index da578b9..bf561d0 100644 --- a/bmc/i2c.c +++ b/bmc/i2c.c @@ -103,7 +103,9 @@ ISR (TWI_vect, ISR_BLOCK) break; default: +#ifdef DEBUG printf("I2C: Unimplemented status 0x%02x\n", TW_STATUS); +#endif TWCR_RESET; break; } -- 2.39.2