Lines Matching full:sequence
68 const struct adc_sequence *sequence) in ads7052_validate_buffer_size() argument
73 channels = POPCOUNT(sequence->channels); in ads7052_validate_buffer_size()
76 if (sequence->options) { in ads7052_validate_buffer_size()
77 needed *= (1 + sequence->options->extra_samplings); in ads7052_validate_buffer_size()
80 if (sequence->buffer_size < needed) { in ads7052_validate_buffer_size()
110 static int ads7052_start_read(const struct device *dev, const struct adc_sequence *sequence) in ads7052_start_read() argument
116 if (sequence->resolution != ADS7052_RESOLUTION) { in ads7052_start_read()
117 LOG_ERR("unsupported resolution %d", sequence->resolution); in ads7052_start_read()
121 if (find_msb_set(sequence->channels) > config->channels) { in ads7052_start_read()
122 LOG_ERR("unsupported channels in mask: 0x%08x", sequence->channels); in ads7052_start_read()
126 if (sequence->calibrate) { in ads7052_start_read()
130 err = ads7052_validate_buffer_size(dev, sequence); in ads7052_start_read()
136 data->buffer = sequence->buffer; in ads7052_start_read()
137 adc_context_start_read(&data->ctx, sequence); in ads7052_start_read()
142 static int adc_ads7052_read_async(const struct device *dev, const struct adc_sequence *sequence, in adc_ads7052_read_async() argument
149 error = ads7052_start_read(dev, sequence); in adc_ads7052_read_async()
155 static int adc_ads7052_read(const struct device *dev, const struct adc_sequence *sequence) in adc_ads7052_read() argument
157 return adc_ads7052_read_async(dev, sequence, NULL); in adc_ads7052_read()
164 data->channels = ctx->sequence.channels; in adc_context_start_sampling()
234 LOG_ERR("failed to send powerup sequence (err %d)", err); in ads7052_acquisition_thread()