Mercurial > flash_v2
changeset 1666:ac397049b1b7
The I2C transfer routine waits now while the bus is busy
instead of just return an error.
| author | asl |
|---|---|
| date | Tue, 08 Jun 2004 17:52:31 +0000 |
| parents | 96994236ec07 |
| children | dc5f9783d45a |
| files | packages/hal/arm/aim711/current/ChangeLog packages/hal/arm/aim711/current/src/aim711_misc.c |
| diffstat | 2 files changed, 9 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/hal/arm/aim711/current/ChangeLog +++ b/packages/hal/arm/aim711/current/ChangeLog @@ -1,3 +1,9 @@ +2004-06-07 Roland Cassebohm <roland.cassebohm@visionsystems.de> + + * src/aim711_misc.c: + The I2C transfer routine waits now while the bus is busy + instead of just return an error. + 2004-04-28 Roland Cassebohm <roland.cassebohm@visionsystems.de> * include/plf_aux.h:
--- a/packages/hal/arm/aim711/current/src/aim711_misc.c +++ b/packages/hal/arm/aim711/current/src/aim711_misc.c @@ -396,12 +396,10 @@ hal_ks32c_i2c_transfer(cyg_uint32 nmsg, } // is the bus free ? - HAL_READ_UINT32(KS32C_I2CCON, i2ccon); - if (i2ccon & KS32C_I2C_CON_BUSY) + do { - cyg_drv_mutex_unlock(&i2c_mutex); - RETURN(I2C_STATUS_BUSY); - } + HAL_READ_UINT32(KS32C_I2CCON, i2ccon); + } while (i2ccon & KS32C_I2C_CON_BUSY); // transfer the messages for (; nmsg > 0; --nmsg, ++pmsgs)
