Lines Matching refs:sequence
65 const struct adc_sequence *sequence) in adc_ad559x_validate_buffer_size() argument
70 channels = POPCOUNT(sequence->channels); in adc_ad559x_validate_buffer_size()
73 if (sequence->buffer_size < needed) { in adc_ad559x_validate_buffer_size()
80 static int adc_ad559x_start_read(const struct device *dev, const struct adc_sequence *sequence) in adc_ad559x_start_read() argument
85 if (sequence->resolution != AD559X_ADC_RESOLUTION) { in adc_ad559x_start_read()
86 LOG_ERR("invalid resolution %d", sequence->resolution); in adc_ad559x_start_read()
90 if (find_msb_set(sequence->channels) > AD559X_PIN_MAX) { in adc_ad559x_start_read()
91 LOG_ERR("invalid channels in mask: 0x%08x", sequence->channels); in adc_ad559x_start_read()
95 ret = adc_ad559x_validate_buffer_size(dev, sequence); in adc_ad559x_start_read()
101 data->buffer = sequence->buffer; in adc_ad559x_start_read()
102 adc_context_start_read(&data->ctx, sequence); in adc_ad559x_start_read()
178 data->channels = ctx->sequence.channels; in adc_context_start_sampling()
220 static int adc_ad559x_read_async(const struct device *dev, const struct adc_sequence *sequence, in adc_ad559x_read_async() argument
227 ret = adc_ad559x_start_read(dev, sequence); in adc_ad559x_read_async()
233 static int adc_ad559x_read(const struct device *dev, const struct adc_sequence *sequence) in adc_ad559x_read() argument
235 return adc_ad559x_read_async(dev, sequence, NULL); in adc_ad559x_read()