mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
feat(ana_cmpr): support analog comparator on esp32h21
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
#include "hal/ana_cmpr_periph.h"
|
||||
#include "soc/ana_cmpr_struct.h"
|
||||
|
||||
const ana_cmpr_periph_t ana_cmpr_periph[SOC_ANA_CMPR_NUM] = {
|
||||
const ana_cmpr_periph_t ana_cmpr_periph[1] = {
|
||||
[0] = {
|
||||
.src_gpio = ANA_CMPR0_SRC_GPIO,
|
||||
.ext_ref_gpio = ANA_CMPR0_EXT_REF_GPIO,
|
||||
@@ -16,7 +16,7 @@ const ana_cmpr_periph_t ana_cmpr_periph[SOC_ANA_CMPR_NUM] = {
|
||||
},
|
||||
};
|
||||
|
||||
analog_cmpr_dev_t ANALOG_CMPR[SOC_ANA_CMPR_NUM] = {
|
||||
analog_cmpr_dev_t ANALOG_CMPR[1] = {
|
||||
[0] = {
|
||||
.pad_comp_config = &GPIO_EXT.pad_comp_config,
|
||||
.pad_comp_filter = &GPIO_EXT.pad_comp_filter,
|
||||
|
||||
@@ -12,6 +12,12 @@
|
||||
#include "hal/ana_cmpr_types.h"
|
||||
#include "soc/ana_cmpr_struct.h"
|
||||
|
||||
#define ANALOG_CMPR_LL_GET(_attr) ANALOG_CMPR_LL_ ## _attr
|
||||
#define ANALOG_CMPR_LL_SUPPORT(_feat) ANALOG_CMPR_LL_SUPPORT_ ## _feat
|
||||
|
||||
// Number of Analog Comparator instances
|
||||
#define ANALOG_CMPR_LL_INST_NUM 1
|
||||
|
||||
#define ANALOG_CMPR_LL_GET_HW(unit) (&ANALOG_CMPR[unit])
|
||||
#define ANALOG_CMPR_LL_EVENT_CROSS (1 << 0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user