Skip to content

Commit 8b96b1a

Browse files
committed
update IDF libs and esptool.py
adds autoreset after firmware upload
1 parent d84d912 commit 8b96b1a

35 files changed

+1213
-177
lines changed

cores/esp32/esp32-hal-i2c.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ i2c_err_t i2cSetFrequency(i2c_t * i2c, uint32_t clk_speed)
347347

348348
I2C_MUTEX_LOCK();
349349
//the clock num during SCL is low level
350-
i2c->dev->scl_low_period.scl_low_period = period;
350+
i2c->dev->scl_low_period.period = period;
351351
//the clock num during SCL is high level
352352
i2c->dev->scl_high_period.period = period;
353353

@@ -375,7 +375,7 @@ uint32_t i2cGetFrequency(i2c_t * i2c)
375375
return 0;
376376
}
377377

378-
return APB_CLK_FREQ/(i2c->dev->scl_low_period.scl_low_period+i2c->dev->scl_high_period.period);
378+
return APB_CLK_FREQ/(i2c->dev->scl_low_period.period+i2c->dev->scl_high_period.period);
379379
}
380380

381381
/*

0 commit comments

Comments
 (0)