Skip to content
Commit db02fdc8 authored by Yunshao Chiang's avatar Yunshao Chiang Committed by Johan Hedberg
Browse files

drivers: adc: it51xxx: fix the ADC channels sampling flow



The original code process causes the following two issues:

1. The first sample is always 0 because the `ctx` sequence in `data` is
   assigned the input sequence until the `adc_context_start_read`. As a
   result, the `while (channels) { ... }` loop is not executed, and
   `adc_enable_measurement` is not called.

2. Since the `ctx` sequence in `data` is assigned in
   `adc_context_start_read`, which occurs after the `while (channels) {
   ... }` loop, the ADC samples the previously set channel.

Signed-off-by: default avatarYunshao Chiang <Yunshao.Chiang@ite.com.tw>
parent 7ac7a0e0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment