From 262dac9c4d35f435716c2404e32aa47b3c4d9c82 Mon Sep 17 00:00:00 2001 From: Cao Sen Miao Date: Thu, 3 Aug 2023 12:33:20 +0800 Subject: [PATCH] change(ulp): change some hal(ll) function name to new ones --- components/ulp/lp_core/lp_core/lp_core_i2c.c | 10 +++++----- components/ulp/lp_core/lp_core_i2c.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/components/ulp/lp_core/lp_core/lp_core_i2c.c b/components/ulp/lp_core/lp_core/lp_core_i2c.c index 7b73fc1cc2..730618db3b 100644 --- a/components/ulp/lp_core/lp_core/lp_core_i2c.c +++ b/components/ulp/lp_core/lp_core/lp_core_i2c.c @@ -58,7 +58,7 @@ static void lp_core_i2c_format_cmd(uint32_t cmd_idx, uint8_t op_code, uint8_t ac }; /* Write new command to cmd register */ - i2c_ll_write_cmd_reg(dev, hw_cmd, cmd_idx); + i2c_ll_master_write_cmd_reg(dev, hw_cmd, cmd_idx); } static inline esp_err_t lp_core_i2c_wait_for_interrupt(uint32_t intr_mask, int32_t ticks_to_wait) @@ -210,7 +210,7 @@ esp_err_t lp_core_i2c_master_read_from_device(i2c_port_t lp_i2c_num, uint16_t de /* Initiate I2C transfer */ i2c_ll_update(dev); - i2c_ll_trans_start(dev); + i2c_ll_master_trans_start(dev); /* Wait for the transfer to complete */ ret = lp_core_i2c_wait_for_interrupt(intr_mask, ticks_to_wait); @@ -301,7 +301,7 @@ esp_err_t lp_core_i2c_master_write_to_device(i2c_port_t lp_i2c_num, uint16_t dev /* Initiate I2C transfer */ i2c_ll_update(dev); - i2c_ll_trans_start(dev); + i2c_ll_master_trans_start(dev); /* Wait for the transfer to complete */ ret = lp_core_i2c_wait_for_interrupt(intr_mask, ticks_to_wait); @@ -388,7 +388,7 @@ esp_err_t lp_core_i2c_master_write_read_device(i2c_port_t lp_i2c_num, uint16_t d /* Initiate I2C transfer */ i2c_ll_update(dev); - i2c_ll_trans_start(dev); + i2c_ll_master_trans_start(dev); /* Wait for the transfer to complete */ ret = lp_core_i2c_wait_for_interrupt(intr_mask, ticks_to_wait); @@ -457,7 +457,7 @@ esp_err_t lp_core_i2c_master_write_read_device(i2c_port_t lp_i2c_num, uint16_t d /* Initiate I2C transfer */ i2c_ll_update(dev); - i2c_ll_trans_start(dev); + i2c_ll_master_trans_start(dev); /* Wait for the transfer to complete */ ret = lp_core_i2c_wait_for_interrupt(intr_mask, ticks_to_wait); diff --git a/components/ulp/lp_core/lp_core_i2c.c b/components/ulp/lp_core/lp_core_i2c.c index 21a26fe328..f6b5307f47 100644 --- a/components/ulp/lp_core/lp_core_i2c.c +++ b/components/ulp/lp_core/lp_core_i2c.c @@ -141,7 +141,7 @@ esp_err_t lp_core_i2c_master_init(i2c_port_t lp_i2c_num, const lp_core_i2c_cfg_t ESP_RETURN_ON_ERROR(lp_i2c_config_clk(cfg), LPI2C_TAG, "Failed to configure LP I2C source clock"); /* Enable SDA and SCL filtering. This configuration matches the HP I2C filter config */ - i2c_ll_set_filter(i2c_hal.dev, LP_I2C_FILTER_CYC_NUM_DEF); + i2c_ll_master_set_filter(i2c_hal.dev, LP_I2C_FILTER_CYC_NUM_DEF); /* Configure the I2C master to send a NACK when the Rx FIFO count is full */ i2c_ll_master_rx_full_ack_level(i2c_hal.dev, 1);