i2c: Fix bug on i2c clk allocator

This commit is contained in:
Cao Sen Miao
2020-10-20 22:53:40 +08:00
parent af992c26bc
commit 31afe8109f
3 changed files with 34 additions and 22 deletions

View File

@@ -56,7 +56,8 @@ static esp_err_t i2c_master_driver_initialize(void)
.sda_pullup_en = GPIO_PULLUP_ENABLE,
.scl_io_num = i2c_gpio_scl,
.scl_pullup_en = GPIO_PULLUP_ENABLE,
.master.clk_speed = i2c_frequency
.master.clk_speed = i2c_frequency,
// .clk_flags = 0, /*!< Optional, you can use I2C_SCLK_SRC_FLAG_* flags to choose i2c source clock here. */
};
return i2c_param_config(i2c_port, &conf);
}