Skip to content

Commit

Permalink
Fix esp-idf ci
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisxhe committed Jan 11, 2024
1 parent 2b8a46e commit 9ee3bd0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/ESP_IDF_TouchDrv_Example/main/touch_drv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ esp_err_t touch_drv_init()
i2c_drv_device_init(address);

ESP_LOGI(TAG, "Implemented using read and write callback methods");
if (touch.init(address, i2c_read_callback, i2c_write_callback)) {
if (touch.begin(address, i2c_read_callback, i2c_write_callback)) {
ESP_LOGI(TAG, "Init touch SUCCESS!");
} else {
ESP_LOGE(TAG, "Init touch FAILED!");
Expand All @@ -88,7 +88,7 @@ esp_err_t touch_drv_init()
// * which is useful when the bus shares multiple devices.
extern i2c_master_bus_handle_t bus_handle;

if (touch.init(bus_handle, address)) {
if (touch.begin(bus_handle, address)) {
ESP_LOGI(TAG, "Init touch SUCCESS!");
} else {
ESP_LOGE(TAG, "Init touch FAILED!");
Expand All @@ -98,7 +98,7 @@ esp_err_t touch_drv_init()
#else

ESP_LOGI(TAG, "Implemented using built-in read and write methods (Use lower version < 5.0 API)");
if (touch.init((i2c_port_t)CONFIG_I2C_MASTER_PORT_NUM, address, CONFIG_SENSOR_SDA, CONFIG_SENSOR_SCL)) {
if (touch.begin((i2c_port_t)CONFIG_I2C_MASTER_PORT_NUM, address, CONFIG_SENSOR_SDA, CONFIG_SENSOR_SCL)) {
ESP_LOGI(TAG, "Init touch SUCCESS!");
} else {
ESP_LOGE(TAG, "Init touch FAILED!");
Expand Down

0 comments on commit 9ee3bd0

Please sign in to comment.