Lines Matching refs:sequence

299 static int check_buffer_size(const struct adc_sequence *sequence,  in check_buffer_size()  argument
305 if (sequence->options) { in check_buffer_size()
306 needed_buffer_size *= (1U + sequence->options->extra_samplings); in check_buffer_size()
309 if (sequence->buffer_size < needed_buffer_size) { in check_buffer_size()
311 sequence->buffer_size, needed_buffer_size); in check_buffer_size()
318 const struct adc_sequence *sequence) in start_read() argument
325 if (sequence->oversampling > 10U) { in start_read()
330 adc->AVGCTRL.reg = ADC_AVGCTRL_SAMPLENUM(sequence->oversampling); in start_read()
338 if (sequence->oversampling > 4U && DSU->DID.bit.REVISION < 3) { in start_read()
339 adc->AVGCTRL.bit.ADJRES = sequence->oversampling - 4U; in start_read()
343 switch (sequence->resolution) { in start_read()
345 if (sequence->oversampling) { in start_read()
353 if (sequence->oversampling) { in start_read()
361 if (sequence->oversampling) { in start_read()
369 sequence->resolution); in start_read()
375 if ((sequence->channels == 0) in start_read()
376 || ((sequence->channels & (sequence->channels - 1)) != 0)) { in start_read()
388 error = check_buffer_size(sequence, 1); in start_read()
393 data->buffer = sequence->buffer; in start_read()
394 data->repeat_buffer = sequence->buffer; in start_read()
401 adc_context_start_read(&data->ctx, sequence); in start_read()
408 const struct adc_sequence *sequence) in adc_sam0_read() argument
414 error = start_read(dev, sequence); in adc_sam0_read()
492 const struct adc_sequence *sequence, in adc_sam0_read_async() argument
499 error = start_read(dev, sequence); in adc_sam0_read_async()