/* Implementation of the ADC driver API function: adc_read_sync. */ static int adc_nrfx_read_async(struct device *dev, const struct adc_sequence *sequence, struct k_poll_signal *async) { adc_context_lock(&m_data.ctx, true, async); return start_read(dev, sequence); }
static int adc_stm32_read(struct device *dev, const struct adc_sequence *sequence) { struct adc_stm32_data *data = dev->driver_data; int error; adc_context_lock(&data->ctx, false, NULL); error = start_read(dev, sequence); adc_context_release(&data->ctx, error); return error; }
static int adc_stm32_read_async(struct device *dev, const struct adc_sequence *sequence, struct k_poll_signal *async) { struct adc_stm32_data *data = dev->driver_data; int error; adc_context_lock(&data->ctx, true, async); error = start_read(dev, sequence); adc_context_release(&data->ctx, error); return error; }
/* Implementation of the ADC driver API function: adc_read. */ static int adc_nrfx_read(struct device *dev, const struct adc_sequence *sequence) { adc_context_lock(&m_data.ctx, false, NULL); return start_read(dev, sequence); }