You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2023/01/31 14:42:37 UTC
[nuttx] 02/03: Revert "arch/arm/src/stm32f7/stm32_i2c.c: Round up stm32_i2c_toticks return value"
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 05eb8541d18454c7732bd8240bddee5ef2e6d2ca
Author: Jukka Laitinen <ju...@ssrc.tii.ae>
AuthorDate: Mon Jan 30 12:15:03 2023 +0400
Revert "arch/arm/src/stm32f7/stm32_i2c.c: Round up stm32_i2c_toticks return value"
This reverts commit fe6f6870dcc431cecf0fa94187cff05ec040cf47.
---
arch/arm/src/stm32f7/stm32_i2c.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/arch/arm/src/stm32f7/stm32_i2c.c b/arch/arm/src/stm32f7/stm32_i2c.c
index 94da6f2321..6a629f6da8 100644
--- a/arch/arm/src/stm32f7/stm32_i2c.c
+++ b/arch/arm/src/stm32f7/stm32_i2c.c
@@ -784,12 +784,11 @@ static uint32_t stm32_i2c_toticks(int msgc, struct i2c_msg_s *msgs)
bytecount += msgs[i].length;
}
- /* Then return a number of ticks based on a user provided scaling
- * factor, rounded up.
+ /* Then return a number of microseconds based on a user provided scaling
+ * factor.
*/
- return USEC2TICK(CONFIG_STM32F7_I2C_DYNTIMEO_USECPERBYTE * bytecount +
- CONFIG_USEC_PER_TICK / 2 - 1);
+ return USEC2TICK(CONFIG_STM32F7_I2C_DYNTIMEO_USECPERBYTE * bytecount);
}
#endif