timeout duplicate division removed

This commit is contained in:
Rop Gonggrijp 2021-07-12 18:28:25 +02:00
parent 5739934d14
commit f7b7c99cf0

View file

@ -191,12 +191,12 @@ esp_err_t I2C_FN(_read)(i2c_port_t port, uint16_t addr, uint32_t reg, uint8_t *b
TickType_t timeout = 0; TickType_t timeout = 0;
#if defined (I2C_ZERO) #if defined (I2C_ZERO)
if (port == I2C_NUM_0) { if (port == I2C_NUM_0) {
timeout = (CONFIG_I2C_MANAGER_0_TIMEOUT) / portTICK_RATE_MS; timeout = I2C_MANAGER_0_TIMEOUT;
} }
#endif #endif
#if defined (I2C_ONE) #if defined (I2C_ONE)
if (port == I2C_NUM_1) { if (port == I2C_NUM_1) {
timeout = (CONFIG_I2C_MANAGER_1_TIMEOUT) / portTICK_RATE_MS; timeout = I2C_MANAGER_1_TIMEOUT;
} }
#endif #endif