Lines Matching refs:sequence
47 static int adc_b91_validate_buffer_size(const struct adc_sequence *sequence) in adc_b91_validate_buffer_size() argument
51 if (sequence->options) { in adc_b91_validate_buffer_size()
52 needed *= (1 + sequence->options->extra_samplings); in adc_b91_validate_buffer_size()
55 if (sequence->buffer_size < needed) { in adc_b91_validate_buffer_size()
63 static int adc_b91_validate_sequence(const struct adc_sequence *sequence) in adc_b91_validate_sequence() argument
67 if (sequence->channels != BIT(0)) { in adc_b91_validate_sequence()
72 if (sequence->oversampling) { in adc_b91_validate_sequence()
77 status = adc_b91_validate_buffer_size(sequence); in adc_b91_validate_sequence()
175 static int adc_b91_adc_start_read(const struct device *dev, const struct adc_sequence *sequence) in adc_b91_adc_start_read() argument
181 status = adc_b91_validate_sequence(sequence); in adc_b91_adc_start_read()
187 switch (sequence->resolution) { in adc_b91_adc_start_read()
210 data->buffer = sequence->buffer; in adc_b91_adc_start_read()
213 adc_context_start_read(&data->ctx, sequence); in adc_b91_adc_start_read()
415 const struct adc_sequence *sequence) in adc_b91_read() argument
421 status = adc_b91_adc_start_read(dev, sequence); in adc_b91_read()
430 const struct adc_sequence *sequence, in adc_b91_read_async() argument
437 status = adc_b91_adc_start_read(dev, sequence); in adc_b91_read_async()