feat(ana_cmpr): supported analog comparator etm function on p4

This commit is contained in:
laokaiyao
2023-07-28 15:40:38 +08:00
parent a989ce4ab1
commit bf2a5653a9
9 changed files with 169 additions and 4 deletions

View File

@@ -10,6 +10,7 @@
#include "hal/misc.h"
#include "hal/assert.h"
#include "soc/ana_cmpr_struct.h"
#include "soc/soc_etm_source.h"
#ifdef __cplusplus
extern "C" {
@@ -22,6 +23,8 @@ extern "C" {
#define ANALOG_CMPR_LL_NEG_CROSS_MASK(unit) (1UL << ((int)unit * 3))
#define ANALOG_CMPR_LL_POS_CROSS_MASK(unit) (1UL << ((int)unit * 3 + 1))
#define ANALOG_CMPR_LL_ETM_SOURCE(unit, type) (GPIO_EVT_ZERO_DET_POS0 + (unit) * 2 + (type))
/**
* @brief Enable analog comparator
*