mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-26 18:14:11 +00:00
refactor the adc driver
This commit is contained in:
25
components/soc/esp32/include/soc/adc_caps.h
Normal file
25
components/soc/esp32/include/soc/adc_caps.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
#define SOC_ADC_PERIPH_NUM (2)
|
||||
#define SOC_ADC_PATT_LEN_MAX (16)
|
||||
|
||||
#define SOC_ADC_CHANNEL_NUM(PERIPH_NUM) ((PERIPH_NUM==0)? 8: 10)
|
||||
#define SOC_ADC_MAX_CHANNEL_NUM (10)
|
||||
|
||||
#define SOC_ADC1_DATA_INVERT_DEFAULT (1)
|
||||
#define SOC_ADC2_DATA_INVERT_DEFAULT (0)
|
||||
|
||||
#define SOC_ADC_FSM_RSTB_WAIT_DEFAULT (8)
|
||||
#define SOC_ADC_FSM_START_WAIT_DEFAULT (5)
|
||||
#define SOC_ADC_FSM_STANDBY_WAIT_DEFAULT (100)
|
||||
#define ADC_FSM_SAMPLE_CYCLE_DEFAULT (2)
|
||||
|
||||
/**
|
||||
* Check if adc support digital controller (DMA) mode.
|
||||
* @value
|
||||
* - 1 : support;
|
||||
* - 0 : not support;
|
||||
*/
|
||||
#define SOC_ADC_SUPPORT_DMA_MODE(PERIPH_NUM) ((PERIPH_NUM==0)? 1: 0)
|
||||
|
||||
#define SOC_ADC_PWDET_CCT_DEFAULT (4)
|
@@ -69,4 +69,4 @@
|
||||
#define ADC2_GPIO26_CHANNEL ADC2_CHANNEL_9
|
||||
#define ADC2_CHANNEL_9_GPIO_NUM 26
|
||||
|
||||
#endif
|
||||
#endif /* _SOC_ADC_CHANNEL_H_ */
|
||||
|
Reference in New Issue
Block a user