mirror of
https://github.com/espressif/esp-idf
synced 2025-03-09 17:19:09 -04:00
Merge branch 'feature/clean_up_some_tasks_in_epic' into 'master'
driver: clean up some tasks in epic Closes IDF-11118, IDF-12003, IDF-10243, IDF-10245, IDF-10246, IDF-10248, IDF-10249, IDF-10252, IDF-10253, IDF-10255, and IDF-10259 See merge request espressif/esp-idf!36377
This commit is contained in:
commit
370e79e15e
@ -21,3 +21,9 @@ if(CONFIG_COMPILER_DUMP_RTL_FILES)
|
||||
DEPENDS ${elf}
|
||||
)
|
||||
endif()
|
||||
|
||||
message(STATUS "Checking adc registers are not read-write by half-word")
|
||||
include($ENV{IDF_PATH}/tools/ci/check_register_rw_half_word.cmake)
|
||||
check_register_rw_half_word(SOC_MODULES "rtc_io" "sens" "syscon" "rtc_cntl" "apb_saradc"
|
||||
"system" "pmu" "pcr" "hp_sys_clkrst" "lpperi" "lp_adc"
|
||||
HAL_MODULES "adc")
|
||||
|
@ -19,3 +19,8 @@ if(CONFIG_COMPILER_DUMP_RTL_FILES)
|
||||
DEPENDS ${elf}
|
||||
)
|
||||
endif()
|
||||
|
||||
message(STATUS "Checking analog comparator registers are not read-write by half-word")
|
||||
include($ENV{IDF_PATH}/tools/ci/check_register_rw_half_word.cmake)
|
||||
check_register_rw_half_word(SOC_MODULES "gpio_ext" "lp_system" "gpio"
|
||||
HAL_MODULES "ana_cmpr")
|
||||
|
@ -6,3 +6,9 @@ set(COMPONENTS main)
|
||||
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(test_csi)
|
||||
|
||||
|
||||
message(STATUS "Checking camera registers are not read-write by half-word")
|
||||
include($ENV{IDF_PATH}/tools/ci/check_register_rw_half_word.cmake)
|
||||
check_register_rw_half_word(SOC_MODULES "lcd_cam" "hp_sys_clkrst" "*csi*"
|
||||
HAL_MODULES "cam" "*csi*")
|
||||
|
@ -19,3 +19,8 @@ if(CONFIG_COMPILER_DUMP_RTL_FILES)
|
||||
DEPENDS ${elf}
|
||||
)
|
||||
endif()
|
||||
|
||||
message(STATUS "Checking dac registers are not read-write by half-word")
|
||||
include($ENV{IDF_PATH}/tools/ci/check_register_rw_half_word.cmake)
|
||||
check_register_rw_half_word(SOC_MODULES "rtc_io" "sens" "apb_saradc"
|
||||
HAL_MODULES "dac")
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -892,12 +892,12 @@ void i2s_gpio_check_and_set(i2s_chan_handle_t handle, int gpio, uint32_t signal_
|
||||
if (gpio != (int)I2S_GPIO_UNUSED) {
|
||||
gpio_func_sel(gpio, PIN_FUNC_GPIO);
|
||||
if (is_input) {
|
||||
/* Set direction, for some GPIOs, the input function are not enabled as default */
|
||||
gpio_set_direction(gpio, GPIO_MODE_INPUT);
|
||||
/* Enable the input, for some GPIOs, the input function are not enabled as default */
|
||||
gpio_input_enable(gpio);
|
||||
esp_rom_gpio_connect_in_signal(gpio, signal_idx, is_invert);
|
||||
} else {
|
||||
i2s_output_gpio_reserve(handle, gpio);
|
||||
gpio_set_direction(gpio, GPIO_MODE_OUTPUT);
|
||||
/* output will be enabled in esp_rom_gpio_connect_out_signal */
|
||||
esp_rom_gpio_connect_out_signal(gpio, signal_idx, is_invert, 0);
|
||||
}
|
||||
}
|
||||
@ -908,7 +908,7 @@ void i2s_gpio_loopback_set(i2s_chan_handle_t handle, int gpio, uint32_t out_sig_
|
||||
if (gpio != (int)I2S_GPIO_UNUSED) {
|
||||
i2s_output_gpio_reserve(handle, gpio);
|
||||
gpio_func_sel(gpio, PIN_FUNC_GPIO);
|
||||
gpio_set_direction(gpio, GPIO_MODE_INPUT_OUTPUT);
|
||||
gpio_input_enable(gpio);
|
||||
esp_rom_gpio_connect_out_signal(gpio, out_sig_idx, 0, 0);
|
||||
esp_rom_gpio_connect_in_signal(gpio, in_sig_idx, 0);
|
||||
}
|
||||
|
@ -19,3 +19,8 @@ if(CONFIG_COMPILER_DUMP_RTL_FILES)
|
||||
DEPENDS ${elf}
|
||||
)
|
||||
endif()
|
||||
|
||||
message(STATUS "Checking i2s registers are not read-write by half-word")
|
||||
include($ENV{IDF_PATH}/tools/ci/check_register_rw_half_word.cmake)
|
||||
check_register_rw_half_word(SOC_MODULES "i2s" "pcr" "hp_sys_clkrst"
|
||||
HAL_MODULES "i2s")
|
||||
|
@ -6,3 +6,8 @@ set(COMPONENTS main)
|
||||
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(lp_i2s_test)
|
||||
|
||||
message(STATUS "Checking lp_i2s registers are not read-write by half-word")
|
||||
include($ENV{IDF_PATH}/tools/ci/check_register_rw_half_word.cmake)
|
||||
check_register_rw_half_word(SOC_MODULES "lp_i2s" "pcr" "hp_sys_clkrst"
|
||||
HAL_MODULES "lp_i2s")
|
||||
|
@ -6,3 +6,9 @@ set(COMPONENTS main)
|
||||
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(test_isp)
|
||||
|
||||
|
||||
message(STATUS "Checking isp registers are not read-write by half-word")
|
||||
include($ENV{IDF_PATH}/tools/ci/check_register_rw_half_word.cmake)
|
||||
check_register_rw_half_word(SOC_MODULES "isp" "hp_sys_clkrst"
|
||||
HAL_MODULES "isp")
|
||||
|
@ -19,3 +19,8 @@ if(CONFIG_COMPILER_DUMP_RTL_FILES)
|
||||
DEPENDS ${elf}
|
||||
)
|
||||
endif()
|
||||
|
||||
message(STATUS "Checking spi registers are not read-write by half-word")
|
||||
include($ENV{IDF_PATH}/tools/ci/check_register_rw_half_word.cmake)
|
||||
check_register_rw_half_word(SOC_MODULES "spi" "syscon" "pcr" "system" "hp_sys_clkrst"
|
||||
HAL_MODULES "spi")
|
||||
|
@ -20,3 +20,9 @@ if(CONFIG_COMPILER_DUMP_RTL_FILES)
|
||||
DEPENDS ${elf}
|
||||
)
|
||||
endif()
|
||||
|
||||
message(STATUS "Checking touch sensor registers are not read-write by half-word")
|
||||
include($ENV{IDF_PATH}/tools/ci/check_register_rw_half_word.cmake)
|
||||
check_register_rw_half_word(SOC_MODULES "rtc_cntl" "sens" "rtc_io" "lp_analog_peri"
|
||||
"lp_clkrst" "lp_system" "lpperi" "touch" "pmu"
|
||||
HAL_MODULES "touch_sensor")
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "hal/clk_tree_ll.h"
|
||||
#include "soc/soc_caps.h"
|
||||
#include "soc/io_mux_reg.h"
|
||||
#include "esp_private/gpio.h"
|
||||
|
||||
typedef struct clkout_channel_handle {
|
||||
bool is_mapped;
|
||||
@ -143,7 +144,6 @@ static esp_clock_output_mapping_t* clkout_mapping_alloc(clkout_channel_handle_t*
|
||||
#elif SOC_GPIO_CLOCKOUT_BY_GPIO_MATRIX
|
||||
gpio_set_pull_mode(gpio_num, GPIO_FLOATING);
|
||||
gpio_hal_iomux_func_sel(GPIO_PIN_MUX_REG[gpio_num], PIN_FUNC_GPIO);
|
||||
gpio_set_direction(gpio_num, GPIO_MODE_OUTPUT);
|
||||
esp_rom_gpio_connect_out_signal(gpio_num, CLKOUT_CHANNEL_TO_GPIO_SIG_ID(allocated_mapping->clkout_channel_hdl->channel_id), false, false);
|
||||
#endif
|
||||
}
|
||||
@ -175,7 +175,7 @@ static void clkout_mapping_free(esp_clock_output_mapping_t *mapping_hdl)
|
||||
if (--mapping_hdl->ref_cnt == 0) {
|
||||
gpio_hal_iomux_func_sel(GPIO_PIN_MUX_REG[mapping_hdl->mapped_io], PIN_FUNC_GPIO);
|
||||
esp_rom_gpio_connect_out_signal(mapping_hdl->mapped_io, SIG_GPIO_OUT_IDX, false, false);
|
||||
gpio_set_direction(mapping_hdl->mapped_io, GPIO_MODE_DISABLE);
|
||||
gpio_output_disable(mapping_hdl->mapped_io);
|
||||
|
||||
portENTER_CRITICAL(&mapping_hdl->clkout_channel_hdl->clkout_channel_lock);
|
||||
mapping_hdl->clkout_channel_hdl->mapped_io_bmap &= ~BIT(mapping_hdl->mapped_io);
|
||||
|
@ -270,7 +270,7 @@ static inline void touch_ll_set_measure_interval_ticks(uint16_t interval_ticks)
|
||||
*/
|
||||
static inline void touch_ll_set_charge_speed(uint32_t touch_num, touch_charge_speed_t charge_speed)
|
||||
{
|
||||
RTCIO.touch_pad[touch_num].dac = charge_speed;
|
||||
RTCIO.touch_pad[touch_num].slope = charge_speed;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -586,7 +586,7 @@ static inline void touch_ll_get_voltage_attenuation(touch_volt_atten_t *atten)
|
||||
*/
|
||||
static inline void touch_ll_set_slope(touch_pad_t touch_num, touch_cnt_slope_t slope)
|
||||
{
|
||||
RTCIO.touch_pad[touch_num].dac = slope;
|
||||
RTCIO.touch_pad[touch_num].slope = slope;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -601,7 +601,7 @@ static inline void touch_ll_set_slope(touch_pad_t touch_num, touch_cnt_slope_t s
|
||||
*/
|
||||
static inline void touch_ll_get_slope(touch_pad_t touch_num, touch_cnt_slope_t *slope)
|
||||
{
|
||||
*slope = (touch_cnt_slope_t)RTCIO.touch_pad[touch_num].dac;
|
||||
*slope = (touch_cnt_slope_t)RTCIO.touch_pad[touch_num].slope;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -496,7 +496,7 @@ static inline void i2s_ll_rx_set_ws_width(i2s_dev_t *hw, int width)
|
||||
*/
|
||||
static inline void i2s_ll_rx_set_eof_num(i2s_dev_t *hw, int eof_num)
|
||||
{
|
||||
hw->rx_eof_num.rx_eof_num = eof_num;
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(hw->rx_eof_num, rx_eof_num, eof_num);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -180,7 +180,7 @@ static inline void spi_ll_clk_source_pre_div(spi_dev_t *hw, uint8_t hs_div, uint
|
||||
{
|
||||
// In IDF master driver 'mst_div' will be const 2 and 'hs_div' is actually pre_div temporally
|
||||
(void) hs_div;
|
||||
PCR.spi2_clkm_conf.spi2_clkm_div_num = mst_div - 1;
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(PCR.spi2_clkm_conf, spi2_clkm_div_num, mst_div - 1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -181,7 +181,7 @@ static inline void spi_ll_clk_source_pre_div(spi_dev_t *hw, uint8_t hs_div, uint
|
||||
{
|
||||
// In IDF master driver 'mst_div' will be const 2 and 'hs_div' is actually pre_div temporally
|
||||
(void) hs_div;
|
||||
PCR.spi2_clkm_conf.spi2_clkm_div_num = mst_div - 1;
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(PCR.spi2_clkm_conf, spi2_clkm_div_num, mst_div - 1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -205,8 +205,8 @@ static inline void adc_ll_digi_set_convert_mode(adc_ll_digi_convert_mode_t mode)
|
||||
static inline void adc_ll_digi_controller_clk_div(uint32_t div_num, uint32_t div_b, uint32_t div_a)
|
||||
{
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(HP_SYS_CLKRST.peri_clk_ctrl23, reg_adc_clk_div_num, div_num);
|
||||
HP_SYS_CLKRST.peri_clk_ctrl23.reg_adc_clk_div_numerator = div_a;
|
||||
HP_SYS_CLKRST.peri_clk_ctrl23.reg_adc_clk_div_denominator = div_b;
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(HP_SYS_CLKRST.peri_clk_ctrl23, reg_adc_clk_div_numerator, div_a);
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(HP_SYS_CLKRST.peri_clk_ctrl23, reg_adc_clk_div_denominator, div_b);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -555,7 +555,7 @@ static inline void isp_ll_af_manual_update(isp_dev_t *hw)
|
||||
static inline void isp_ll_af_set_edge_thresh_mode(isp_dev_t *hw, isp_ll_af_edge_detector_mode_t mode)
|
||||
{
|
||||
if (mode == ISP_LL_AF_EDGE_DETECTOR_MODE_AUTO) {
|
||||
hw->af_threshold.af_threshold = 0;
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(hw->af_threshold, af_threshold, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -569,7 +569,7 @@ static inline void isp_ll_af_set_edge_thresh(isp_dev_t *hw, uint32_t thresh)
|
||||
{
|
||||
HAL_ASSERT(thresh != 0);
|
||||
|
||||
hw->af_threshold.af_threshold = thresh;
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(hw->af_threshold, af_threshold, thresh);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -580,7 +580,7 @@ static inline void isp_ll_af_set_edge_thresh(isp_dev_t *hw, uint32_t thresh)
|
||||
*/
|
||||
static inline void isp_ll_af_set_auto_edge_thresh_pixel_num(isp_dev_t *hw, uint32_t pixel_num)
|
||||
{
|
||||
HAL_ASSERT(hw->af_threshold.af_threshold == 0);
|
||||
HAL_ASSERT(HAL_FORCE_READ_U32_REG_FIELD(hw->af_threshold, af_threshold) == 0);
|
||||
|
||||
hw->af_ctrl1.af_thpixnum = pixel_num;
|
||||
}
|
||||
@ -686,7 +686,7 @@ static inline uint32_t isp_ll_af_get_window_lum(isp_dev_t *hw, uint32_t window_i
|
||||
*/
|
||||
static inline void isp_ll_af_env_detector_set_period(isp_dev_t *hw, uint32_t period)
|
||||
{
|
||||
hw->af_ctrl0.af_env_period = period;
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(hw->af_ctrl0, af_env_period, period);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -789,7 +789,7 @@ static inline void isp_ll_bf_set_padding_mode(isp_dev_t *hw, isp_bf_edge_padding
|
||||
*/
|
||||
static inline void isp_ll_bf_set_padding_data(isp_dev_t *hw, uint32_t padding_data)
|
||||
{
|
||||
hw->bf_matrix_ctrl.bf_padding_data = padding_data;
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(hw->bf_matrix_ctrl, bf_padding_data, padding_data);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -800,7 +800,7 @@ static inline void isp_ll_bf_set_padding_data(isp_dev_t *hw, uint32_t padding_da
|
||||
*/
|
||||
static inline void isp_ll_bf_set_padding_line_tail_valid_start_pixel(isp_dev_t *hw, uint32_t start_pixel)
|
||||
{
|
||||
hw->bf_matrix_ctrl.bf_tail_pixen_pulse_tl = start_pixel;
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(hw->bf_matrix_ctrl, bf_tail_pixen_pulse_tl, start_pixel);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -811,7 +811,7 @@ static inline void isp_ll_bf_set_padding_line_tail_valid_start_pixel(isp_dev_t *
|
||||
*/
|
||||
static inline void isp_ll_bf_set_padding_line_tail_valid_end_pixel(isp_dev_t *hw, uint32_t end_pixel)
|
||||
{
|
||||
hw->bf_matrix_ctrl.bf_tail_pixen_pulse_th = end_pixel;
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(hw->bf_matrix_ctrl, bf_tail_pixen_pulse_th, end_pixel);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1174,8 +1174,8 @@ static inline void isp_ll_ae_set_subwin_pixnum_recip(isp_dev_t *hw, int subwin_p
|
||||
*/
|
||||
static inline void isp_ll_ae_env_detector_set_thresh(isp_dev_t *hw, uint32_t low_thresh, uint32_t high_thresh)
|
||||
{
|
||||
hw->ae_monitor.ae_monitor_tl = low_thresh;
|
||||
hw->ae_monitor.ae_monitor_th = high_thresh;
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(hw->ae_monitor, ae_monitor_tl, low_thresh);
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(hw->ae_monitor, ae_monitor_th, high_thresh);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1557,7 +1557,7 @@ static inline void isp_ll_demosaic_set_padding_mode(isp_dev_t *hw, isp_demosaic_
|
||||
__attribute__((always_inline))
|
||||
static inline void isp_ll_demosaic_set_padding_data(isp_dev_t *hw, uint32_t padding_data)
|
||||
{
|
||||
hw->demosaic_matrix_ctrl.demosaic_padding_data = padding_data;
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(hw->demosaic_matrix_ctrl, demosaic_padding_data, padding_data);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1569,7 +1569,7 @@ static inline void isp_ll_demosaic_set_padding_data(isp_dev_t *hw, uint32_t padd
|
||||
__attribute__((always_inline))
|
||||
static inline void isp_ll_demosaic_set_padding_line_tail_valid_start_pixel(isp_dev_t *hw, uint32_t start_pixel)
|
||||
{
|
||||
hw->demosaic_matrix_ctrl.demosaic_tail_pixen_pulse_tl = start_pixel;
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(hw->demosaic_matrix_ctrl, demosaic_tail_pixen_pulse_tl, start_pixel);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1581,7 +1581,7 @@ static inline void isp_ll_demosaic_set_padding_line_tail_valid_start_pixel(isp_d
|
||||
__attribute__((always_inline))
|
||||
static inline void isp_ll_demosaic_set_padding_line_tail_valid_end_pixel(isp_dev_t *hw, uint32_t end_pixel)
|
||||
{
|
||||
hw->demosaic_matrix_ctrl.demosaic_tail_pixen_pulse_th = end_pixel;
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(hw->demosaic_matrix_ctrl, demosaic_tail_pixen_pulse_th, end_pixel);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------
|
||||
@ -1618,7 +1618,7 @@ static inline void isp_ll_sharp_enable(isp_dev_t *hw, bool enable)
|
||||
__attribute__((always_inline))
|
||||
static inline void isp_ll_sharp_set_low_thresh(isp_dev_t *hw, uint8_t thresh)
|
||||
{
|
||||
hw->sharp_ctrl0.sharp_threshold_low = thresh;
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(hw->sharp_ctrl0, sharp_threshold_low, thresh);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1630,7 +1630,7 @@ static inline void isp_ll_sharp_set_low_thresh(isp_dev_t *hw, uint8_t thresh)
|
||||
__attribute__((always_inline))
|
||||
static inline void isp_ll_sharp_set_high_thresh(isp_dev_t *hw, uint8_t thresh)
|
||||
{
|
||||
hw->sharp_ctrl0.sharp_threshold_high = thresh;
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(hw->sharp_ctrl0, sharp_threshold_high, thresh);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1643,7 +1643,7 @@ __attribute__((always_inline))
|
||||
static inline void isp_ll_sharp_set_medium_freq_coeff(isp_dev_t *hw, isp_sharpen_m_freq_coeff coeff)
|
||||
{
|
||||
//val between `sharp_amount_low` and `sharp_threshold_high` will be multiplied by `sharp_amount_low`
|
||||
hw->sharp_ctrl0.sharp_amount_low = coeff.val;
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(hw->sharp_ctrl0, sharp_amount_low, coeff.val);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1656,7 +1656,7 @@ __attribute__((always_inline))
|
||||
static inline void isp_ll_sharp_set_high_freq_coeff(isp_dev_t *hw, isp_sharpen_h_freq_coeff_t coeff)
|
||||
{
|
||||
//val higher than `sharp_threshold_high` will be multiplied by `sharp_amount_high`
|
||||
hw->sharp_ctrl0.sharp_amount_high = coeff.val;
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(hw->sharp_ctrl0, sharp_amount_high, coeff.val);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1680,7 +1680,7 @@ static inline void isp_ll_sharp_set_padding_mode(isp_dev_t *hw, isp_sharpen_edge
|
||||
__attribute__((always_inline))
|
||||
static inline void isp_ll_sharp_set_padding_data(isp_dev_t *hw, uint32_t padding_data)
|
||||
{
|
||||
hw->sharp_matrix_ctrl.sharp_padding_data = padding_data;
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(hw->sharp_matrix_ctrl, sharp_padding_data, padding_data);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1692,7 +1692,7 @@ static inline void isp_ll_sharp_set_padding_data(isp_dev_t *hw, uint32_t padding
|
||||
__attribute__((always_inline))
|
||||
static inline void isp_ll_sharp_set_padding_line_tail_valid_start_pixel(isp_dev_t *hw, uint32_t start_pixel)
|
||||
{
|
||||
hw->sharp_matrix_ctrl.sharp_tail_pixen_pulse_tl = start_pixel;
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(hw->sharp_matrix_ctrl, sharp_tail_pixen_pulse_tl, start_pixel);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1704,7 +1704,7 @@ static inline void isp_ll_sharp_set_padding_line_tail_valid_start_pixel(isp_dev_
|
||||
__attribute__((always_inline))
|
||||
static inline void isp_ll_sharp_set_padding_line_tail_valid_end_pixel(isp_dev_t *hw, uint32_t end_pixel)
|
||||
{
|
||||
hw->sharp_matrix_ctrl.sharp_tail_pixen_pulse_th = end_pixel;
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(hw->sharp_matrix_ctrl, sharp_tail_pixen_pulse_th, end_pixel);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1741,7 +1741,7 @@ static inline void isp_ll_sharp_set_template(isp_dev_t *hw, uint8_t template_arr
|
||||
__attribute__((always_inline))
|
||||
static inline uint8_t isp_ll_sharp_get_high_freq_pixel_max(isp_dev_t *hw)
|
||||
{
|
||||
return hw->sharp_ctrl1.sharp_gradient_max;
|
||||
return HAL_FORCE_READ_U32_REG_FIELD(hw->sharp_ctrl1, sharp_gradient_max);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------
|
||||
|
@ -114,7 +114,7 @@ static inline void lp_i2s_ll_enable_mem(int id, bool en)
|
||||
|
||||
static inline void lp_i2s_ll_set_rx_mem_threshold(lp_i2s_dev_t *hw, uint32_t words)
|
||||
{
|
||||
LP_I2S.rx_mem_conf.rx_mem_threshold = words;
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(hw->rx_mem_conf, rx_mem_threshold, words);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------
|
||||
@ -785,7 +785,7 @@ static inline void lp_vad_ll_set_speak_activity_thresh(lp_i2s_dev_t *hw, int thr
|
||||
*/
|
||||
static inline void lp_vad_ll_set_non_speak_activity_thresh(lp_i2s_dev_t *hw, int thresh)
|
||||
{
|
||||
hw->vad_param1.param_hangover_silent = thresh;
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(hw->vad_param1, param_hangover_silent, thresh);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -215,11 +215,11 @@ __attribute__((always_inline))
|
||||
static inline void spi_ll_clk_source_pre_div(spi_dev_t *hw, uint8_t hs_div, uint8_t mst_div)
|
||||
{
|
||||
if (hw == &GPSPI2) {
|
||||
HP_SYS_CLKRST.peri_clk_ctrl116.reg_gpspi2_hs_clk_div_num = hs_div - 1;
|
||||
HP_SYS_CLKRST.peri_clk_ctrl116.reg_gpspi2_mst_clk_div_num = mst_div - 1;
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(HP_SYS_CLKRST.peri_clk_ctrl116, reg_gpspi2_hs_clk_div_num, hs_div - 1);
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(HP_SYS_CLKRST.peri_clk_ctrl116, reg_gpspi2_mst_clk_div_num, mst_div - 1);
|
||||
} else if (hw == &GPSPI3) {
|
||||
HP_SYS_CLKRST.peri_clk_ctrl117.reg_gpspi3_hs_clk_div_num = hs_div - 1;
|
||||
HP_SYS_CLKRST.peri_clk_ctrl117.reg_gpspi3_mst_clk_div_num = mst_div - 1;
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(HP_SYS_CLKRST.peri_clk_ctrl117, reg_gpspi3_hs_clk_div_num, hs_div - 1);
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(HP_SYS_CLKRST.peri_clk_ctrl117, reg_gpspi3_mst_clk_div_num, mst_div - 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -408,7 +408,7 @@ static inline void touch_ll_read_chan_data(uint32_t touch_num, uint8_t sample_cf
|
||||
LP_ANA_PERI.touch_mux0.touch_freq_sel = sample_cfg_id;
|
||||
LP_ANA_PERI.touch_mux0.touch_data_sel = type;
|
||||
// Channel shift workaround
|
||||
*data = LP_TOUCH.chn_data[touch_num + 1].pad_data;
|
||||
*data = HAL_FORCE_READ_U32_REG_FIELD(LP_TOUCH.chn_data[touch_num + 1], pad_data);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -564,7 +564,7 @@ static inline uint32_t touch_ll_get_intr_status_mask(void)
|
||||
static inline void touch_ll_set_timeout(uint32_t timeout_cycles)
|
||||
{
|
||||
if (timeout_cycles) {
|
||||
LP_ANA_PERI.touch_scan_ctrl2.touch_timeout_num = timeout_cycles;
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(LP_ANA_PERI.touch_scan_ctrl2, touch_timeout_num, timeout_cycles);
|
||||
LP_ANA_PERI.touch_scan_ctrl2.touch_timeout_en = 1;
|
||||
} else {
|
||||
LP_ANA_PERI.touch_scan_ctrl2.touch_timeout_en = 0;
|
||||
@ -847,7 +847,7 @@ static inline void touch_ll_set_proximity_sensing_channel(uint8_t prox_chan, uin
|
||||
*/
|
||||
static inline void touch_ll_proximity_set_total_scan_times(uint32_t scan_times)
|
||||
{
|
||||
LP_ANA_PERI.touch_filter1.touch_approach_limit = scan_times;
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(LP_ANA_PERI.touch_filter1, touch_approach_limit, scan_times);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -260,7 +260,7 @@ static inline void touch_ll_set_measure_interval_ticks(uint16_t interval_ticks)
|
||||
*/
|
||||
static inline void touch_ll_set_charge_speed(uint32_t touch_num, touch_charge_speed_t charge_speed)
|
||||
{
|
||||
RTCIO.touch_pad[touch_num].dac = charge_speed;
|
||||
RTCIO.touch_pad[touch_num].slope = charge_speed;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -923,7 +923,7 @@ static inline void touch_ll_get_voltage_attenuation(touch_volt_atten_t *atten)
|
||||
*/
|
||||
static inline void touch_ll_set_slope(touch_pad_t touch_num, touch_cnt_slope_t slope)
|
||||
{
|
||||
RTCIO.touch_pad[touch_num].dac = slope;
|
||||
RTCIO.touch_pad[touch_num].slope = slope;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -938,7 +938,7 @@ static inline void touch_ll_set_slope(touch_pad_t touch_num, touch_cnt_slope_t s
|
||||
*/
|
||||
static inline void touch_ll_get_slope(touch_pad_t touch_num, touch_cnt_slope_t *slope)
|
||||
{
|
||||
*slope = (touch_cnt_slope_t)RTCIO.touch_pad[touch_num].dac;
|
||||
*slope = (touch_cnt_slope_t)RTCIO.touch_pad[touch_num].slope;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -236,7 +236,7 @@ typedef volatile struct rtc_io_dev_s {
|
||||
uint32_t xpd: 1; /*touch sensor power on.*/
|
||||
uint32_t tie_opt: 1; /*default touch sensor tie option. 0: tie low 1: tie high.*/
|
||||
uint32_t start: 1; /*start touch sensor.*/
|
||||
uint32_t dac: 3; /*touch sensor slope control. 3-bit for each touch panel default 100.*/
|
||||
uint32_t slope: 3; /*touch sensor slope control. 3-bit for each touch panel default 100.*/
|
||||
uint32_t reserved26: 1;
|
||||
uint32_t rue: 1; /*the pull up enable of the pad*/
|
||||
uint32_t rde: 1; /*the pull down enable of the pad*/
|
||||
|
@ -117,7 +117,7 @@ typedef volatile struct rtc_io_dev_s {
|
||||
uint32_t xpd: 1; /*TOUCH_XPD*/
|
||||
uint32_t tie_opt: 1; /*TOUCH_TIE_OPT*/
|
||||
uint32_t start: 1; /*TOUCH_START*/
|
||||
uint32_t dac: 3; /*TOUCH_DAC*/
|
||||
uint32_t slope: 3; /*TOUCH_SLOPE*/
|
||||
uint32_t reserved26: 1;
|
||||
uint32_t rue: 1; /*RUE*/
|
||||
uint32_t rde: 1; /*RDE*/
|
||||
|
@ -50,7 +50,7 @@ def main(
|
||||
for capture in captures:
|
||||
error_usages = [f'.{capture}', f'->{capture}']
|
||||
for error_usage in error_usages:
|
||||
word_bound_pattern = rf'{re.escape(error_usage)}\b'
|
||||
word_bound_pattern = rf'{re.escape(error_usage)}\s*[;|=](.*)\b'
|
||||
# print the line number where the error_usage is found
|
||||
for match in re.finditer(word_bound_pattern, content, re.MULTILINE):
|
||||
no_violation_found = False
|
||||
|
Loading…
x
Reference in New Issue
Block a user