mirror of
https://github.com/apache/nuttx.git
synced 2026-06-08 01:42:58 +08:00
Fix a error the the STM32 I2C timeout logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3940 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -200,7 +200,7 @@ int inline stm32_i2c_sem_waitisr(FAR struct i2c_dev_s *dev)
|
||||
flags = irqsave();
|
||||
do
|
||||
{
|
||||
(void)clock_settime(CLOCK_REALTIME, &abstime);
|
||||
(void)clock_gettime(CLOCK_REALTIME, &abstime);
|
||||
abstime.tv_nsec += CONFIG_STM32_I2CTIMEOMS * 1000 * 1000;
|
||||
if (abstime.tv_nsec > 1000 * 1000 * 1000)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user