From 97136375e393d71000a8f5e7c4c5a1b1bcb0f464 Mon Sep 17 00:00:00 2001 From: px4dev Date: Thu, 10 Jan 2013 01:56:46 -0800 Subject: [PATCH] Turn off the I2C register dump at startup. --- apps/px4io/i2c.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/px4io/i2c.c b/apps/px4io/i2c.c index 61daa9ada4..037c64522e 100644 --- a/apps/px4io/i2c.c +++ b/apps/px4io/i2c.c @@ -65,7 +65,9 @@ #define rTRISE REG(STM32_I2C_TRISE_OFFSET) static int i2c_interrupt(int irq, void *context); +#ifdef DEBUG static void i2c_dump(void); +#endif static void i2c_rx_setup(void); static void i2c_tx_setup(void); @@ -138,7 +140,9 @@ i2c_init(void) /* and enable the I2C port */ rCR1 |= I2C_CR1_ACK | I2C_CR1_PE; +#ifdef DEBUG i2c_dump(); +#endif } static int @@ -259,7 +263,7 @@ i2c_tx_complete(void) i2c_tx_setup(); } - +#ifdef DEBUG static void i2c_dump(void) { @@ -268,4 +272,4 @@ i2c_dump(void) debug("CCR 0x%08x TRISE 0x%08x", rCCR, rTRISE); debug("SR1 0x%08x SR2 0x%08x", rSR1, rSR2); } - +#endif \ No newline at end of file