adc: support ADC on esp32c6 (driver/test/example)

This commit is contained in:
laokaiyao
2022-12-23 11:24:06 +08:00
parent e27f3e3128
commit 5333ac81bf
50 changed files with 363 additions and 331 deletions
@@ -175,6 +175,10 @@ config SOC_ADC_ATTEN_NUM
int
default 4
config SOC_ADC_DIGI_SEGMENTED_THRESH
bool
default y
config SOC_ADC_DIGI_CONTROLLER_NUM
int
default 1
@@ -284,8 +284,8 @@ typedef enum {
* @brief ADC digital controller clock source
*/
typedef enum {
ADC_DIGI_CLK_SRC_APB = SOC_MOD_CLK_APB,
ADC_DIGI_CLK_SRC_DEFAULT = SOC_MOD_CLK_APB,
ADC_DIGI_CLK_SRC_APB = SOC_MOD_CLK_APB, /*!< Select APB as the source clock */
ADC_DIGI_CLK_SRC_DEFAULT = SOC_MOD_CLK_APB, /*!< Select APB as the default clock choice */
} soc_periph_adc_digi_clk_src_t;
#ifdef __cplusplus
@@ -85,6 +85,7 @@
#define SOC_ADC_ATTEN_NUM (4)
/*!< Digital */
#define SOC_ADC_DIGI_SEGMENTED_THRESH 1
#define SOC_ADC_DIGI_CONTROLLER_NUM (1U)
#define SOC_ADC_PATT_LEN_MAX (8) /*!< One pattern table, each contains 8 items. Each item takes 1 byte */
#define SOC_ADC_DIGI_MIN_BITWIDTH (12)