mirror of
https://github.com/apache/nuttx.git
synced 2026-05-23 06:39:01 +08:00
drivers/adc: Use mutexlock to replace critical section protection
Use mutexlock to replace critical section protection when using adc_isr_thread Signed-off-by: zhangkai25 <zhangkai25@xiaomi.com>
This commit is contained in:
@@ -213,7 +213,7 @@ struct adc_dev_s
|
||||
|
||||
uint8_t ad_ocount; /* The number of times the device has been opened */
|
||||
uint8_t ad_nrxwaiters; /* Number of threads waiting to enqueue a message */
|
||||
mutex_t ad_closelock; /* Locks out new opens while close is in progress */
|
||||
mutex_t ad_lock; /* Locks use in adc open、close and read */
|
||||
sem_t ad_recvsem; /* Used to wakeup user waiting for space in ad_recv.buffer */
|
||||
struct adc_fifo_s ad_recv; /* Describes receive FIFO */
|
||||
bool ad_isovr; /* Flag to indicate an ADC overrun */
|
||||
|
||||
Reference in New Issue
Block a user