diff --git a/components/esp_driver_i2c/i2c_common.c b/components/esp_driver_i2c/i2c_common.c index 19af0a2977..87bad063b0 100644 --- a/components/esp_driver_i2c/i2c_common.c +++ b/components/esp_driver_i2c/i2c_common.c @@ -351,8 +351,8 @@ static esp_err_t s_lp_i2c_pins_config(i2c_bus_handle_t handle) #if !SOC_LP_GPIO_MATRIX_SUPPORTED rtc_gpio_iomux_func_sel(handle->sda_num, i2c_periph_signal[port_id].iomux_func); #else - lp_gpio_connect_out_signal(handle->sda_num, i2c_periph_signal[port_id].scl_out_sig, 0, 0); - lp_gpio_connect_in_signal(handle->sda_num, i2c_periph_signal[port_id].scl_in_sig, 0); + lp_gpio_connect_out_signal(handle->sda_num, i2c_periph_signal[port_id].sda_out_sig, 0, 0); + lp_gpio_connect_in_signal(handle->sda_num, i2c_periph_signal[port_id].sda_in_sig, 0); #endif rtc_gpio_init(handle->scl_num); @@ -366,8 +366,8 @@ static esp_err_t s_lp_i2c_pins_config(i2c_bus_handle_t handle) #if !SOC_LP_GPIO_MATRIX_SUPPORTED rtc_gpio_iomux_func_sel(handle->scl_num, i2c_periph_signal[port_id].iomux_func); #else - lp_gpio_connect_out_signal(handle->scl_num, i2c_periph_signal[port_id].sda_out_sig, 0, 0); - lp_gpio_connect_in_signal(handle->scl_num, i2c_periph_signal[port_id].sda_in_sig, 0); + lp_gpio_connect_out_signal(handle->scl_num, i2c_periph_signal[port_id].scl_out_sig, 0, 0); + lp_gpio_connect_in_signal(handle->scl_num, i2c_periph_signal[port_id].scl_in_sig, 0); #endif return ESP_OK; diff --git a/components/esp_driver_i2c/test_apps/i2c_test_apps/main/test_board.h b/components/esp_driver_i2c/test_apps/i2c_test_apps/main/test_board.h index 4a48f624f4..f6080cfa62 100644 --- a/components/esp_driver_i2c/test_apps/i2c_test_apps/main/test_board.h +++ b/components/esp_driver_i2c/test_apps/i2c_test_apps/main/test_board.h @@ -26,9 +26,14 @@ extern "C" { #endif #if SOC_LP_I2C_SUPPORTED +#if CONFIG_IDF_TARGET_ESP32P4 +#define LP_I2C_SCL_IO 4 +#define LP_I2C_SDA_IO 5 +#else #define LP_I2C_SCL_IO 7 #define LP_I2C_SDA_IO 6 #endif +#endif #define ESP_SLAVE_ADDR 0x28 /*!< ESP_I2C slave address, you can set any 7bit value */ #define TEST_I2C_PORT 0