Lines Matching refs:unit

61 	adc_unit_t unit;  member
130 static void adc_hw_calibration(adc_unit_t unit) in adc_hw_calibration() argument
133 adc_hal_calibration_init(unit); in adc_hw_calibration()
135 adc_calc_hw_calibration_code(unit, j); in adc_hw_calibration()
138 for (int k = 0; k < SOC_ADC_CHANNEL_NUM(unit); k++) { in adc_hw_calibration()
139 adc_load_hw_calibration_chan_compens(unit, k, j); in adc_hw_calibration()
264 (unsigned int)channel_id, (unsigned int)conf->unit); in adc_esp32_fill_digi_pattern()
270 adc_digi_pattern_config->unit = conf->unit; in adc_esp32_fill_digi_pattern()
299 adc_lock_acquire(conf->unit); in adc_esp32_digi_start()
302 adc_set_hw_calibration_code(conf->unit, unit_attenuation); in adc_esp32_digi_start()
306 if (conf->unit == ADC_UNIT_2) { in adc_esp32_digi_start()
321 (conf->unit == ADC_UNIT_1)?ADC_CONV_SINGLE_UNIT_1:ADC_CONV_SINGLE_UNIT_2; in adc_esp32_digi_start()
340 adc_hal_set_controller(conf->unit, ADC_HAL_CONTINUOUS_READ_MODE); in adc_esp32_digi_start()
355 adc_lock_release(conf->unit); in adc_esp32_digi_stop()
435 if (conf->unit == ADC_UNIT_1) { in adc_esp32_read()
439 adc_set_data_width(conf->unit, data->resolution[channel_id]); in adc_esp32_read()
444 if (conf->unit == ADC_UNIT_1) { in adc_esp32_read()
447 if (conf->unit == ADC_UNIT_2) { in adc_esp32_read()
598 if (conf->unit == ADC_UNIT_1) { in adc_esp32_channel_setup()
601 if (conf->unit == ADC_UNIT_2) { in adc_esp32_channel_setup()
606 esp_adc_cal_value_t cal = esp_adc_cal_characterize(conf->unit, in adc_esp32_channel_setup()
620 if (!SOC_ADC_DIG_SUPPORTED_UNIT(conf->unit)) { in adc_esp32_channel_setup()
625 int io_num = adc_channel_io_map[conf->unit][cfg->channel_id]; in adc_esp32_channel_setup()
655 adc_hw_calibration(conf->unit); in adc_esp32_init()
658 if (conf->unit == ADC_UNIT_2) { in adc_esp32_init()
738 .unit = DT_PROP(DT_DRV_INST(inst), unit) - 1, \