|
|
@@ -1,5 +1,5 @@
|
|
|
/*
|
|
|
- * SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
|
|
|
+ * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
|
|
*
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
*/
|
|
|
@@ -28,12 +28,6 @@
|
|
|
extern "C" {
|
|
|
#endif
|
|
|
|
|
|
-#define ADC_LL_CLKM_DIV_NUM_DEFAULT 19
|
|
|
-#define ADC_LL_CLKM_DIV_B_DEFAULT 1
|
|
|
-#define ADC_LL_CLKM_DIV_A_DEFAULT 0
|
|
|
-#define ADC_LL_DEFAULT_CONV_LIMIT_EN 0
|
|
|
-#define ADC_LL_DEFAULT_CONV_LIMIT_NUM 10
|
|
|
-
|
|
|
#define ADC_LL_EVENT_ADC1_ONESHOT_DONE BIT(31)
|
|
|
#define ADC_LL_EVENT_ADC2_ONESHOT_DONE BIT(30)
|
|
|
#define ADC_LL_EVENT_THRES0_HIGH BIT(29)
|
|
|
@@ -41,6 +35,33 @@ extern "C" {
|
|
|
#define ADC_LL_EVENT_THRES0_LOW BIT(27)
|
|
|
#define ADC_LL_EVENT_THRES1_LOW BIT(26)
|
|
|
|
|
|
+/*---------------------------------------------------------------
|
|
|
+ Oneshot
|
|
|
+---------------------------------------------------------------*/
|
|
|
+#define ADC_LL_DATA_INVERT_DEFAULT(PERIPH_NUM) (0)
|
|
|
+#define ADC_LL_SAR_CLK_DIV_DEFAULT(PERIPH_NUM) (2)
|
|
|
+
|
|
|
+/*---------------------------------------------------------------
|
|
|
+ DMA
|
|
|
+---------------------------------------------------------------*/
|
|
|
+#define ADC_LL_DIGI_DATA_INVERT_DEFAULT(PERIPH_NUM) (0)
|
|
|
+#define ADC_LL_FSM_RSTB_WAIT_DEFAULT (8)
|
|
|
+#define ADC_LL_FSM_START_WAIT_DEFAULT (5)
|
|
|
+#define ADC_LL_FSM_STANDBY_WAIT_DEFAULT (100)
|
|
|
+#define ADC_LL_SAMPLE_CYCLE_DEFAULT (2)
|
|
|
+#define ADC_LL_DIGI_SAR_CLK_DIV_DEFAULT (2)
|
|
|
+
|
|
|
+#define ADC_LL_CLKM_DIV_NUM_DEFAULT 19
|
|
|
+#define ADC_LL_CLKM_DIV_B_DEFAULT 1
|
|
|
+#define ADC_LL_CLKM_DIV_A_DEFAULT 0
|
|
|
+#define ADC_LL_DEFAULT_CONV_LIMIT_EN 0
|
|
|
+#define ADC_LL_DEFAULT_CONV_LIMIT_NUM 10
|
|
|
+
|
|
|
+/*---------------------------------------------------------------
|
|
|
+ PWDET (Power Detect)
|
|
|
+---------------------------------------------------------------*/
|
|
|
+#define ADC_LL_PWDET_CCT_DEFAULT (4)
|
|
|
+
|
|
|
typedef enum {
|
|
|
ADC_LL_POWER_BY_FSM = SAR_CTRL_LL_POWER_FSM, /*!< ADC XPD controlled by FSM. Used for polling mode */
|
|
|
ADC_LL_POWER_SW_ON = SAR_CTRL_LL_POWER_ON, /*!< ADC XPD controlled by SW. power on. Used for DMA mode */
|