I2C. Small bugfix.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/i2c_dev@2731 35acf78f-673a-0410-8e92-d51de3d6d3f4
master
barthess 2011-02-10 17:36:37 +00:00
parent 12778b0075
commit e96e10761e
1 changed files with 1 additions and 1 deletions

View File

@ -160,7 +160,7 @@ static void i2c_serve_event_interrupt(I2CDriver *i2cp) {
} }
// "wait" interrupt with ADDR (ADD10 in 10-bit receiver mode) flag // "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 if(i2cp->id_i2c->SR2 & I2C_SR2_TRA){// I2C is transmitting data
i2cp->id_state = I2C_MTRANSMIT; // change state i2cp->id_state = I2C_MTRANSMIT; // change state
i2c_lld_txbyte(i2cp); // send first byte i2c_lld_txbyte(i2cp); // send first byte