From: Michael Gernoth Date: Sun, 22 Aug 2010 22:38:04 +0000 (+0200) Subject: remove DEBUG printouts from non-debug build X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/rsbs2/commitdiff_plain/f9d5c6e0b95e763fb9900e1e7cd5114bc452dfb9 remove DEBUG printouts from non-debug build --- 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; }