mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 12:35:28 +00:00
ci: check register half word
This commit is contained in:

committed by
Kevin (Lao Kaiyao)

parent
79fd265c20
commit
c13ac70aa7
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user