Lines Matching full:sequence

37 static bool adc_kb1200_validate_buffer_size(const struct adc_sequence *sequence)  in adc_kb1200_validate_buffer_size()  argument
44 if (chan_mask & sequence->channels) { in adc_kb1200_validate_buffer_size()
51 if (sequence->options) { in adc_kb1200_validate_buffer_size()
52 buff_need *= 1 + sequence->options->extra_samplings; in adc_kb1200_validate_buffer_size()
55 if (buff_need > sequence->buffer_size) { in adc_kb1200_validate_buffer_size()
69 static int adc_kb1200_start_read(const struct device *dev, const struct adc_sequence *sequence) in adc_kb1200_start_read() argument
75 if (!sequence->channels || (sequence->channels & ~BIT_MASK(ADC_MAX_CHAN))) { in adc_kb1200_start_read()
80 if (sequence->resolution != ADC_RESOLUTION) { in adc_kb1200_start_read()
84 /* Check sequence->buffer_size is enough */ in adc_kb1200_start_read()
85 if (!adc_kb1200_validate_buffer_size(sequence)) { in adc_kb1200_start_read()
91 data->buffer = sequence->buffer; in adc_kb1200_start_read()
92 data->buf_end = data->buffer + sequence->buffer_size / sizeof(uint16_t); in adc_kb1200_start_read()
96 adc_context_start_read(&data->ctx, sequence); in adc_kb1200_start_read()
169 static int adc_kb1200_read(const struct device *dev, const struct adc_sequence *sequence) in adc_kb1200_read() argument
175 error = adc_kb1200_start_read(dev, sequence); in adc_kb1200_read()
182 static int adc_kb1200_read_async(const struct device *dev, const struct adc_sequence *sequence, in adc_kb1200_read_async() argument
189 error = adc_kb1200_start_read(dev, sequence); in adc_kb1200_read_async()
205 (ctx->sequence.channels << ADC_CHANNEL_BIT_POS); in adc_context_start_sampling()