feat(ana_cmpr): supported etm in analog comparator example

This commit is contained in:
laokaiyao
2023-09-25 19:57:34 +08:00
parent bf2a5653a9
commit ff7a11e539
44 changed files with 796 additions and 267 deletions
+1 -1
View File
@@ -7,7 +7,7 @@
#include "soc/ana_cmpr_periph.h"
#include "soc/ana_cmpr_struct.h"
const ana_cmpr_conn_t ana_cmpr_io_map[SOC_ANA_CMPR_NUM] = {
const ana_cmpr_periph_t ana_cmpr_periph[SOC_ANA_CMPR_NUM] = {
[0] = {
.src_gpio = ANA_CMPR0_SRC_GPIO,
.ext_ref_gpio = ANA_CMPR0_EXT_REF_GPIO,
@@ -391,7 +391,7 @@ config SOC_ANA_CMPR_NUM
int
default 2
config SOC_ANA_CMPR_SUPPORT_MULTI_INTR
config SOC_ANA_CMPR_CAN_DISTINGUISH_EDGE
bool
default y
@@ -399,10 +399,6 @@ config SOC_ANA_CMPR_SUPPORT_ETM
bool
default y
config SOC_ANA_CMPR_ETM_EVENTS_PER_UNIT
int
default 2
config SOC_I2C_NUM
int
default 2
@@ -413,7 +413,7 @@ typedef enum {
#define SOC_ANA_CMPR_CLKS {SOC_MOD_CLK_PLL_F80M, SOC_MOD_CLK_XTAL}
/**
* @brief Sigma Delta Modulator clock source
* @brief Analog Comparator clock source
*/
typedef enum {
ANA_CMPR_CLK_SRC_XTAL = SOC_MOD_CLK_XTAL, /*!< Select XTAL clock as the source clock */
@@ -221,10 +221,9 @@
#define SOC_DEDIC_PERIPH_ALWAYS_ENABLE (1) /*!< The dedicated GPIO (a.k.a. fast GPIO) is featured by some customized CPU instructions, which is always enabled */
/*------------------------- Analog Comparator CAPS ---------------------------*/
#define SOC_ANA_CMPR_NUM (2U)
#define SOC_ANA_CMPR_SUPPORT_MULTI_INTR (1)
#define SOC_ANA_CMPR_SUPPORT_ETM (1)
#define SOC_ANA_CMPR_ETM_EVENTS_PER_UNIT (2)
#define SOC_ANA_CMPR_NUM (2)
#define SOC_ANA_CMPR_CAN_DISTINGUISH_EDGE (1) // Support positive/negative/any cross interrupt
#define SOC_ANA_CMPR_SUPPORT_ETM (1)
/*-------------------------- I2C CAPS ----------------------------------------*/
// ESP32-P4 has 2 I2Cs