]> git.zerfleddert.de Git - rsbs2/blobdiff - bmc/i2c.c
remove DEBUG printouts from non-debug build
[rsbs2] / bmc / i2c.c
index e479fd32e50092ca5ceef796913a881a603d2c3a..bf561d0270fc173e846416b1bb8e00dfe5b6fe8c 100644 (file)
--- a/bmc/i2c.c
+++ b/bmc/i2c.c
@@ -55,10 +55,9 @@ void i2c_send(unsigned char *buf, int len)
        }
 
        TWCR = ((1<<TWINT) | (1<<TWEN) | (1<<TWSTO));
-       while(!(TWCR & (1<<TWSTO))) {}
+       while(TWCR & (1<<TWSTO)) {}
 
-#if 1
-       /* Timing problem... */
+#ifdef DEBUG
        printf("I2C Data sent\n");
 #endif
 
@@ -104,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