Add driver for LM-75 temperature sensor
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3947 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
5b27f168d1
commit
3a3c6f31fd
@ -934,6 +934,8 @@ int stm32_i2c_process(FAR struct i2c_dev_s *dev, FAR struct i2c_msg_s *msgs, int
|
||||
|
||||
/* Check for error status conditions */
|
||||
|
||||
if ((status & I2C_SR1_ERRORMASK) != 0)
|
||||
{
|
||||
if (status & I2C_SR1_BERR)
|
||||
{
|
||||
/* Bus Error */
|
||||
@ -971,17 +973,6 @@ int stm32_i2c_process(FAR struct i2c_dev_s *dev, FAR struct i2c_msg_s *msgs, int
|
||||
status_errno = ETIME;
|
||||
}
|
||||
|
||||
/* This is not an error, but should not happen. The BUSY signal can hang,
|
||||
* however, if there are unhealthy devices on the bus that need to be reset.
|
||||
*/
|
||||
|
||||
else if (status & (I2C_SR2_BUSY << 16))
|
||||
{
|
||||
/* I2C Bus is for some reason busy */
|
||||
|
||||
status_errno = EBUSY;
|
||||
}
|
||||
|
||||
/* This is not an error and should never happen since SMBus is not enabled */
|
||||
|
||||
else if (status & I2C_SR1_SMBALERT)
|
||||
@ -992,6 +983,18 @@ int stm32_i2c_process(FAR struct i2c_dev_s *dev, FAR struct i2c_msg_s *msgs, int
|
||||
|
||||
status_errno = EINTR;
|
||||
}
|
||||
}
|
||||
|
||||
/* This is not an error, but should not happen. The BUSY signal can hang,
|
||||
* however, if there are unhealthy devices on the bus that need to be reset.
|
||||
*/
|
||||
|
||||
else if (status & (I2C_SR2_BUSY << 16))
|
||||
{
|
||||
/* I2C Bus is for some reason busy */
|
||||
|
||||
status_errno = EBUSY;
|
||||
}
|
||||
|
||||
/* Re-enable the FSMC */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user