Fix return values from sleep(), usleep(), and sigtimedwait(). Fix STM32 F2 I2C bug-for-bug compatibility

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4786 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo
2012-05-30 15:36:46 +00:00
parent e48bc996c4
commit 81c4bcb9b5
6 changed files with 254 additions and 37 deletions
+2 -2
View File
@@ -1125,11 +1125,11 @@ static int stm32_i2c_isr(struct stm32_i2c_priv_s *priv)
}
#endif
/* Was last byte received or sent? Hmmm... the F4 seems to differ from
/* Was last byte received or sent? Hmmm... the F2 and F4 seems to differ from
* the F1 in that BTF is not set after data is received (only RXNE).
*/
#ifdef CONFIG_STM32_STM32F40XX
#if defined(CONFIG_STM32_STM32F20XX) || defined(CONFIG_STM32_STM32F40XX)
if (priv->dcnt <= 0 && (status & (I2C_SR1_BTF|I2C_SR1_RXNE)) != 0)
#else
if (priv->dcnt <= 0 && (status & I2C_SR1_BTF) != 0)