Lines Matching refs:conf

182 	const struct adc_esp32_conf *conf = dev->config;  in adc_esp32_dma_start()  local
190 err = dma_get_status(conf->dma_dev, conf->dma_channel, &dma_status); in adc_esp32_dma_start()
193 (unsigned int)conf->dma_channel, err); in adc_esp32_dma_start()
198 LOG_ERR("dma channel[%u] is busy!", (unsigned int)conf->dma_channel); in adc_esp32_dma_start()
213 err = dma_config(conf->dma_dev, conf->dma_channel, &dma_cfg); in adc_esp32_dma_start()
219 err = dma_start(conf->dma_dev, conf->dma_channel); in adc_esp32_dma_start()
232 const struct adc_esp32_conf *conf = dev->config; in adc_esp32_dma_stop() local
236 err = dma_stop(conf->dma_dev, conf->dma_channel); in adc_esp32_dma_stop()
248 const struct adc_esp32_conf *conf = dev->config; in adc_esp32_fill_digi_pattern() local
258 for (uint8_t channel_id = 0; channel_id < conf->channel_count; channel_id++) { in adc_esp32_fill_digi_pattern()
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()
295 const struct adc_esp32_conf *conf = dev->config; in adc_esp32_digi_start() local
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()
334 .dma_chan = conf->dma_channel, in adc_esp32_digi_start()
340 adc_hal_set_controller(conf->unit, ADC_HAL_CONTINUOUS_READ_MODE); in adc_esp32_digi_start()
348 const struct adc_esp32_conf *conf = dev->config; in adc_esp32_digi_stop() local
355 adc_lock_release(conf->unit); in adc_esp32_digi_stop()
387 const struct adc_esp32_conf *conf = dev->config; in adc_esp32_read() local
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()
569 const struct adc_esp32_conf *conf = (const struct adc_esp32_conf *)dev->config; in adc_esp32_channel_setup() local
572 if (cfg->channel_id >= conf->channel_count) { in adc_esp32_channel_setup()
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()
633 .port = conf->gpio_port, in adc_esp32_channel_setup()
653 const struct adc_esp32_conf *conf = (struct adc_esp32_conf *) dev->config; in adc_esp32_init() local
655 adc_hw_calibration(conf->unit); in adc_esp32_init()
658 if (conf->unit == ADC_UNIT_2) { in adc_esp32_init()
664 if (!device_is_ready(conf->gpio_port)) { in adc_esp32_init()