]> git.zerfleddert.de Git - rsbs2/commitdiff
remove DEBUG printouts from non-debug build
authorMichael Gernoth <michael@gernoth.net>
Sun, 22 Aug 2010 22:38:04 +0000 (00:38 +0200)
committerMichael Gernoth <michael@gernoth.net>
Sun, 22 Aug 2010 22:38:04 +0000 (00:38 +0200)
bmc/bmc.c
bmc/chassis.c
bmc/i2c.c

index 99427f6580713ccbda8093a75b24e6b49897c206..abe86e53751053c279eac5c38bc97006d8750375 100644 (file)
--- a/bmc/bmc.c
+++ b/bmc/bmc.c
@@ -1,5 +1,6 @@
 #include <avr/io.h>
 #include <avr/interrupt.h>
+#include <avr/sleep.h>
 #include <string.h>
 #include <stdio.h>
 #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) {
index 5bdad1f511431f04fd996a42f3146cb5cb5eb334..fd488663d7ec3735efebe70a3a71cb0bc9356b9a 100644 (file)
@@ -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;
        }
 }
index da578b9e8fce82cec56ed1575ab658fcccf8a573..bf561d0270fc173e846416b1bb8e00dfe5b6fe8c 100644 (file)
--- 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;
        }
Impressum, Datenschutz