From e96e10761e38f07f884553c8ec6bcbaa06f42dd4 Mon Sep 17 00:00:00 2001 From: barthess Date: Thu, 10 Feb 2011 17:36:37 +0000 Subject: [PATCH] I2C. Small bugfix. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/i2c_dev@2731 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/STM32/i2c_lld.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os/hal/platforms/STM32/i2c_lld.c b/os/hal/platforms/STM32/i2c_lld.c index ea535f246..ebfe9b423 100644 --- a/os/hal/platforms/STM32/i2c_lld.c +++ b/os/hal/platforms/STM32/i2c_lld.c @@ -160,7 +160,7 @@ static void i2c_serve_event_interrupt(I2CDriver *i2cp) { } // "wait" interrupt with ADDR (ADD10 in 10-bit receiver mode) flag - if ((i2cp->id_state == I2C_MWAIT_ADDR_ACK) && (i2cp->id_i2c->SR1 & I2C_SR1_ADDR & I2C_SR1_ADD10)){// address ACKed + if ((i2cp->id_state == I2C_MWAIT_ADDR_ACK) && (i2cp->id_i2c->SR1 & (I2C_SR1_ADDR | I2C_SR1_ADD10))){// address ACKed if(i2cp->id_i2c->SR2 & I2C_SR2_TRA){// I2C is transmitting data i2cp->id_state = I2C_MTRANSMIT; // change state i2c_lld_txbyte(i2cp); // send first byte