diff options
author | px4dev <px4@purgatory.org> | 2013-01-10 01:56:46 -0800 |
---|---|---|
committer | px4dev <px4@purgatory.org> | 2013-01-13 19:05:00 -0800 |
commit | 97136375e393d71000a8f5e7c4c5a1b1bcb0f464 (patch) | |
tree | 610572418b47bcad8110a976b451ed06477b3b80 /apps/px4io/i2c.c | |
parent | 4f285f7c80904bf7685ab3d5d8bf515b5c0ad7ab (diff) | |
download | px4-firmware-97136375e393d71000a8f5e7c4c5a1b1bcb0f464.tar.gz px4-firmware-97136375e393d71000a8f5e7c4c5a1b1bcb0f464.tar.bz2 px4-firmware-97136375e393d71000a8f5e7c4c5a1b1bcb0f464.zip |
Turn off the I2C register dump at startup.
Diffstat (limited to 'apps/px4io/i2c.c')
-rw-r--r-- | apps/px4io/i2c.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/px4io/i2c.c b/apps/px4io/i2c.c index 61daa9ada..037c64522 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 |