Lines Matching refs:sequence
159 data->num_active_channels = count_bits(ctx->sequence.channels); in adc_context_start_sampling()
165 adc->ADC_CHER = ctx->sequence.channels; in adc_context_start_sampling()
181 static int check_buffer_size(const struct adc_sequence *sequence, in check_buffer_size() argument
186 if (sequence->options) { in check_buffer_size()
187 needed_buffer_size *= (1 + sequence->options->extra_samplings); in check_buffer_size()
190 if (sequence->buffer_size < needed_buffer_size) { in check_buffer_size()
192 sequence->buffer_size, needed_buffer_size); in check_buffer_size()
200 const struct adc_sequence *sequence) in start_read() argument
203 uint32_t channels = sequence->channels; in start_read()
215 if (sequence->oversampling != 0U) { in start_read()
220 if (sequence->resolution != 12U) { in start_read()
221 LOG_ERR("ADC resolution %d is not valid", sequence->resolution); in start_read()
227 error = check_buffer_size(sequence, data->num_active_channels); in start_read()
232 data->buffer = sequence->buffer; in start_read()
233 data->repeat_buffer = sequence->buffer; in start_read()
240 adc_context_start_read(&data->ctx, sequence); in start_read()
246 const struct adc_sequence *sequence) in adc_sam_read() argument
252 error = start_read(dev, sequence); in adc_sam_read()
365 const struct adc_sequence *sequence, in adc_sam_read_async() argument
372 error = start_read(dev, sequence); in adc_sam_read_async()