From f0f20e0496d1a8ef53f8d57dbd8ad4790f3478b3 Mon Sep 17 00:00:00 2001 From: kooho <2229179028@qq.com> Date: Tue, 26 Nov 2019 11:34:41 +0800 Subject: [PATCH] bugfix(i2c): fix esp32-s2 i2c driver UT issue --- components/soc/esp32s2beta/include/hal/i2c_ll.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/soc/esp32s2beta/include/hal/i2c_ll.h b/components/soc/esp32s2beta/include/hal/i2c_ll.h index 11f5d3785c..13fdd1ad65 100644 --- a/components/soc/esp32s2beta/include/hal/i2c_ll.h +++ b/components/soc/esp32s2beta/include/hal/i2c_ll.h @@ -100,8 +100,8 @@ static inline void i2c_ll_rxfifo_rst(i2c_dev_t *hw) static inline void i2c_ll_set_scl_timing(i2c_dev_t *hw, int hight_period, int low_period) { hw->scl_low_period.period = low_period; - hw->scl_high_period.period = hight_period*0.6; - hw->scl_high_period.scl_wait_high_period = hight_period*0.4-1; + hw->scl_high_period.period = hight_period; + hw->scl_high_period.scl_wait_high_period = 0; } /**