Skip to content
Commit 4381841b authored by Tim Lin's avatar Tim Lin Committed by Anas Nashif
Browse files

ITE: drivers/adc: fix the sampling flow of ADC



The ADC sampling of it8xxx2 needs to read each channel in sequence,
so it needs to wait for an interrupt to read data in the loop
through k_sem_take().

In test_adc.c, k_timer_start() is used in the interval test, so we
need to use polling wait instead of k_sem_take() to wait, otherwise
it will cause kernel panic.

k_is_in_isr() can determine whether to use polling or k_sem_take()
at present.

Signed-off-by: default avatarTim Lin <tim2.lin@ite.corp-partner.google.com>
parent 60088b18
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment