Home
last modified time | relevance | path

Searched refs:adc_n (Results 1 – 15 of 15) sorted by relevance

/hal_espressif-3.7.0/components/hal/
Dadc_hal_common.c93 void adc_hal_calibration_init(adc_unit_t adc_n) in adc_hal_calibration_init() argument
95 adc_ll_calibration_init(adc_n); in adc_hal_calibration_init()
102 void adc_hal_set_calibration_param(adc_unit_t adc_n, uint32_t param) in adc_hal_set_calibration_param() argument
104 if (param != s_previous_init_code[adc_n]) { in adc_hal_set_calibration_param()
105 adc_ll_set_calibration_param(adc_n, param); in adc_hal_set_calibration_param()
106 s_previous_init_code[adc_n] = param; in adc_hal_set_calibration_param()
111 static void cal_setup(adc_unit_t adc_n, adc_atten_t atten) in cal_setup() argument
113 adc_hal_set_controller(adc_n, ADC_HAL_SINGLE_READ_MODE); in cal_setup()
116 adc_oneshot_ll_disable_channel(adc_n); in cal_setup()
122 adc_oneshot_ll_set_atten(adc_n, 0, atten); in cal_setup()
[all …]
/hal_espressif-3.7.0/components/hal/esp32c2/include/hal/
Dadc_ll.h130 static inline void adc_ll_digi_output_invert(adc_unit_t adc_n, bool inv_en) in adc_ll_digi_output_invert() argument
132 if (adc_n == ADC_UNIT_1) { in adc_ll_digi_output_invert()
179 static inline void adc_ll_digi_filter_reset(adc_digi_iir_filter_t idx, adc_unit_t adc_n) in adc_ll_digi_filter_reset() argument
181 (void)adc_n; in adc_ll_digi_filter_reset()
194 static inline void adc_ll_digi_filter_set_factor(adc_digi_iir_filter_t idx, adc_unit_t adc_n, adc_c… in adc_ll_digi_filter_set_factor() argument
218 … APB_SARADC.saradc_filter_ctrl0.saradc_filter_channel0 = ((adc_n + 1) << 3) | (channel & 0x7); in adc_ll_digi_filter_set_factor()
221 … APB_SARADC.saradc_filter_ctrl0.saradc_filter_channel1 = ((adc_n + 1) << 3) | (channel & 0x7); in adc_ll_digi_filter_set_factor()
234 static inline void adc_ll_digi_filter_enable(adc_digi_iir_filter_t idx, adc_unit_t adc_n, bool enab… in adc_ll_digi_filter_enable() argument
236 (void)adc_n; in adc_ll_digi_filter_enable()
347 static inline void adc_ll_set_controller(adc_unit_t adc_n, adc_ll_controller_t ctrl) in adc_ll_set_controller() argument
[all …]
/hal_espressif-3.7.0/components/hal/esp32c6/include/hal/
Dadc_ll.h186 static inline void adc_ll_digi_set_pattern_table_len(adc_unit_t adc_n, uint32_t patt_len) in adc_ll_digi_set_pattern_table_len() argument
201 static inline void adc_ll_digi_set_pattern_table(adc_unit_t adc_n, uint32_t pattern_index, adc_digi… in adc_ll_digi_set_pattern_table() argument
227 static inline void adc_ll_digi_clear_pattern_table(adc_unit_t adc_n) in adc_ll_digi_clear_pattern_table() argument
250 static inline void adc_ll_digi_output_invert(adc_unit_t adc_n, bool inv_en) in adc_ll_digi_output_invert() argument
252 if (adc_n == ADC_UNIT_1) { in adc_ll_digi_output_invert()
338 static inline void adc_ll_digi_filter_reset(adc_digi_iir_filter_t idx, adc_unit_t adc_n) in adc_ll_digi_filter_reset() argument
340 (void)adc_n; in adc_ll_digi_filter_reset()
353 static inline void adc_ll_digi_filter_set_factor(adc_digi_iir_filter_t idx, adc_unit_t adc_n, adc_c… in adc_ll_digi_filter_set_factor() argument
377 …APB_SARADC.saradc_filter_ctrl0.saradc_apb_saradc_filter_channel0 = ((adc_n + 1) << 3) | (channel &… in adc_ll_digi_filter_set_factor()
380 …APB_SARADC.saradc_filter_ctrl0.saradc_apb_saradc_filter_channel1 = ((adc_n + 1) << 3) | (channel &… in adc_ll_digi_filter_set_factor()
[all …]
/hal_espressif-3.7.0/components/hal/esp32s3/include/hal/
Dadc_ll.h236 static inline void adc_ll_digi_set_pattern_table_len(adc_unit_t adc_n, uint32_t patt_len) in adc_ll_digi_set_pattern_table_len() argument
238 if (adc_n == ADC_UNIT_1) { in adc_ll_digi_set_pattern_table_len()
255 static inline void adc_ll_digi_set_pattern_table(adc_unit_t adc_n, uint32_t pattern_index, adc_digi… in adc_ll_digi_set_pattern_table() argument
281 static inline void adc_ll_digi_clear_pattern_table(adc_unit_t adc_n) in adc_ll_digi_clear_pattern_table() argument
283 if (adc_n == ADC_UNIT_1) { in adc_ll_digi_clear_pattern_table()
309 static inline void adc_ll_digi_output_invert(adc_unit_t adc_n, bool inv_en) in adc_ll_digi_output_invert() argument
311 if (adc_n == ADC_UNIT_1) { in adc_ll_digi_output_invert()
388 static inline void adc_ll_digi_filter_reset(adc_digi_iir_filter_t idx, adc_unit_t adc_n) in adc_ll_digi_filter_reset() argument
390 (void)adc_n; in adc_ll_digi_filter_reset()
403 static inline void adc_ll_digi_filter_set_factor(adc_digi_iir_filter_t idx, adc_unit_t adc_n, adc_c… in adc_ll_digi_filter_set_factor() argument
[all …]
/hal_espressif-3.7.0/components/hal/esp32h2/include/hal/
Dadc_ll.h186 static inline void adc_ll_digi_set_pattern_table_len(adc_unit_t adc_n, uint32_t patt_len) in adc_ll_digi_set_pattern_table_len() argument
201 static inline void adc_ll_digi_set_pattern_table(adc_unit_t adc_n, uint32_t pattern_index, adc_digi… in adc_ll_digi_set_pattern_table() argument
227 static inline void adc_ll_digi_clear_pattern_table(adc_unit_t adc_n) in adc_ll_digi_clear_pattern_table() argument
250 static inline void adc_ll_digi_output_invert(adc_unit_t adc_n, bool inv_en) in adc_ll_digi_output_invert() argument
252 if (adc_n == ADC_UNIT_1) { in adc_ll_digi_output_invert()
338 static inline void adc_ll_digi_filter_reset(adc_digi_iir_filter_t idx, adc_unit_t adc_n) in adc_ll_digi_filter_reset() argument
340 (void)adc_n; in adc_ll_digi_filter_reset()
353 static inline void adc_ll_digi_filter_set_factor(adc_digi_iir_filter_t idx, adc_unit_t adc_n, adc_c… in adc_ll_digi_filter_set_factor() argument
377 …APB_SARADC.saradc_filter_ctrl0.saradc_apb_saradc_filter_channel0 = ((adc_n + 1) << 3) | (channel &… in adc_ll_digi_filter_set_factor()
380 …APB_SARADC.saradc_filter_ctrl0.saradc_apb_saradc_filter_channel1 = ((adc_n + 1) << 3) | (channel &… in adc_ll_digi_filter_set_factor()
[all …]
/hal_espressif-3.7.0/components/hal/esp32s2/include/hal/
Dadc_ll.h230 static inline void adc_ll_digi_set_pattern_table_len(adc_unit_t adc_n, uint32_t patt_len) in adc_ll_digi_set_pattern_table_len() argument
232 if (adc_n == ADC_UNIT_1) { in adc_ll_digi_set_pattern_table_len()
249 static inline void adc_ll_digi_set_pattern_table(adc_unit_t adc_n, uint32_t pattern_index, adc_digi… in adc_ll_digi_set_pattern_table() argument
275 static inline void adc_ll_digi_clear_pattern_table(adc_unit_t adc_n) in adc_ll_digi_clear_pattern_table() argument
277 if (adc_n == ADC_UNIT_1) { in adc_ll_digi_clear_pattern_table()
303 static inline void adc_ll_digi_output_invert(adc_unit_t adc_n, bool inv_en) in adc_ll_digi_output_invert() argument
305 if (adc_n == ADC_UNIT_1) { in adc_ll_digi_output_invert()
383 static inline void adc_ll_digi_filter_reset(adc_digi_iir_filter_t idx, adc_unit_t adc_n) in adc_ll_digi_filter_reset() argument
386 if (adc_n == ADC_UNIT_1) { in adc_ll_digi_filter_reset()
403 static inline void adc_ll_digi_filter_set_factor(adc_digi_iir_filter_t idx, adc_unit_t adc_n, adc_c… in adc_ll_digi_filter_set_factor() argument
[all …]
/hal_espressif-3.7.0/components/hal/esp32c3/include/hal/
Dadc_ll.h187 static inline void adc_ll_digi_set_pattern_table_len(adc_unit_t adc_n, uint32_t patt_len) in adc_ll_digi_set_pattern_table_len() argument
202 static inline void adc_ll_digi_set_pattern_table(adc_unit_t adc_n, uint32_t pattern_index, adc_digi… in adc_ll_digi_set_pattern_table() argument
221 static inline void adc_ll_digi_clear_pattern_table(adc_unit_t adc_n) in adc_ll_digi_clear_pattern_table() argument
244 static inline void adc_ll_digi_output_invert(adc_unit_t adc_n, bool inv_en) in adc_ll_digi_output_invert() argument
246 if (adc_n == ADC_UNIT_1) { in adc_ll_digi_output_invert()
322 static inline void adc_ll_digi_filter_reset(adc_digi_iir_filter_t idx, adc_unit_t adc_n) in adc_ll_digi_filter_reset() argument
324 (void)adc_n; in adc_ll_digi_filter_reset()
337 static inline void adc_ll_digi_filter_set_factor(adc_digi_iir_filter_t idx, adc_unit_t adc_n, adc_c… in adc_ll_digi_filter_set_factor() argument
361 APB_SARADC.filter_ctrl0.filter_channel0 = ((adc_n + 1) << 3) | (channel & 0x7); in adc_ll_digi_filter_set_factor()
364 APB_SARADC.filter_ctrl0.filter_channel1 = ((adc_n + 1) << 3) | (channel & 0x7); in adc_ll_digi_filter_set_factor()
[all …]
/hal_espressif-3.7.0/components/esp_hw_support/
Dadc_share_hw_ctrl.c64 void adc_calc_hw_calibration_code(adc_unit_t adc_n, adc_atten_t atten) in adc_calc_hw_calibration_code() argument
66 if (s_adc_cali_param[adc_n][atten]) { in adc_calc_hw_calibration_code()
67 …LY_LOGV(TAG, "Use calibrated val ADC%d atten=%d: %04X", adc_n + 1, atten, s_adc_cali_param[adc_n][… in adc_calc_hw_calibration_code()
79 init_code = esp_efuse_rtc_calib_get_init_code(version, adc_n, atten); in adc_calc_hw_calibration_code()
88 init_code = adc_hal_self_calibration(adc_n, atten, internal_gnd); in adc_calc_hw_calibration_code()
98 s_adc_cali_param[adc_n][atten] = init_code; in adc_calc_hw_calibration_code()
99 ESP_EARLY_LOGV(TAG, "Calib(V%d) ADC%d atten=%d: %04X", version, adc_n + 1, atten, init_code); in adc_calc_hw_calibration_code()
102 void IRAM_ATTR adc_set_hw_calibration_code(adc_unit_t adc_n, adc_atten_t atten) in adc_set_hw_calibration_code() argument
104 adc_hal_set_calibration_param(adc_n, s_adc_cali_param[adc_n][atten]); in adc_set_hw_calibration_code()
109 void adc_load_hw_calibration_chan_compens(adc_unit_t adc_n, adc_channel_t chan, adc_atten_t atten) in adc_load_hw_calibration_chan_compens() argument
[all …]
/hal_espressif-3.7.0/components/hal/esp32/include/hal/
Dadc_ll.h193 static inline void adc_ll_digi_output_invert(adc_unit_t adc_n, bool inv_en) in adc_ll_digi_output_invert() argument
195 if (adc_n == ADC_UNIT_1) { in adc_ll_digi_output_invert()
221 static inline void adc_ll_digi_set_pattern_table_len(adc_unit_t adc_n, uint32_t patt_len) in adc_ll_digi_set_pattern_table_len() argument
223 if (adc_n == ADC_UNIT_1) { in adc_ll_digi_set_pattern_table_len()
240 static inline void adc_ll_digi_set_pattern_table(adc_unit_t adc_n, uint32_t pattern_index, adc_digi… in adc_ll_digi_set_pattern_table() argument
284 static inline void adc_ll_digi_clear_pattern_table(adc_unit_t adc_n) in adc_ll_digi_clear_pattern_table() argument
286 if (adc_n == ADC_UNIT_1) { in adc_ll_digi_clear_pattern_table()
339 static inline void adc_ll_set_sar_clk_div(adc_unit_t adc_n, uint32_t div) in adc_ll_set_sar_clk_div() argument
341 if (adc_n == ADC_UNIT_1) { in adc_ll_set_sar_clk_div()
354 static inline void adc_oneshot_ll_set_output_bits(adc_unit_t adc_n, adc_bitwidth_t bits) in adc_oneshot_ll_set_output_bits() argument
[all …]
/hal_espressif-3.7.0/components/esp_hw_support/include/esp_private/
Dadc_share_hw_ctrl.h39 void adc_calc_hw_calibration_code(adc_unit_t adc_n, adc_atten_t atten);
47 void adc_set_hw_calibration_code(adc_unit_t adc_n, adc_atten_t atten);
57 void adc_load_hw_calibration_chan_compens(adc_unit_t adc_n, adc_channel_t chan, adc_atten_t atten);
68 int adc_get_hw_calibration_chan_compens(adc_unit_t adc_n, adc_channel_t chan, adc_atten_t atten);
/hal_espressif-3.7.0/components/hal/include/hal/
Dadc_hal_common.h66 void adc_hal_calibration_init(adc_unit_t adc_n);
76 void adc_hal_set_calibration_param(adc_unit_t adc_n, uint32_t param);
91 uint32_t adc_hal_self_calibration(adc_unit_t adc_n, adc_atten_t atten, bool internal_gnd);
/hal_espressif-3.7.0/components/driver/deprecated/
Dadc_legacy.c106 static esp_err_t adc_hal_convert(adc_unit_t adc_n, int channel, uint32_t clk_src_freq_hz, int *out_…
674 uint8_t adc_n = (adc_unit == ADC_UNIT_1) ? 0 : 1; in adc_digi_get_io_num() local
675 return adc_channel_io_map[adc_n][adc_channel]; in adc_digi_get_io_num()
868 static void adc_hal_onetime_start(adc_unit_t adc_n, uint32_t clk_src_freq_hz) in adc_hal_onetime_start() argument
871 (void)adc_n; in adc_hal_onetime_start()
894 adc_oneshot_ll_start(adc_n); in adc_hal_onetime_start()
898 static esp_err_t adc_hal_convert(adc_unit_t adc_n, int channel, uint32_t clk_src_freq_hz, int *out_… in adc_hal_convert() argument
901 …uint32_t event = (adc_n == ADC_UNIT_1) ? ADC_LL_EVENT_ADC1_ONESHOT_DONE : ADC_LL_EVENT_ADC2_ONESHO… in adc_hal_convert()
904 adc_oneshot_ll_enable(adc_n); in adc_hal_convert()
905 adc_oneshot_ll_set_channel(adc_n, channel); in adc_hal_convert()
[all …]
Dadc_i2s_deprecated.c131 static inline void adc_ll_digi_prepare_pattern_table(adc_unit_t adc_n, uint32_t pattern_index, adc_… in adc_ll_digi_prepare_pattern_table() argument
136 if (adc_n == ADC_UNIT_1) { in adc_ll_digi_prepare_pattern_table()
Dadc_dma_legacy.c108 uint8_t adc_n = (adc_unit == ADC_UNIT_1) ? 0 : 1; in adc_digi_get_io_num() local
109 return adc_channel_io_map[adc_n][adc_channel]; in adc_digi_get_io_num()
/hal_espressif-3.7.0/components/esp_adc/
Dadc_continuous.c71 uint8_t adc_n = (adc_unit == ADC_UNIT_1) ? 0 : 1; in adc_digi_get_io_num() local
72 return adc_channel_io_map[adc_n][adc_channel]; in adc_digi_get_io_num()