hal: added analog comparator's LL driver

This commit is contained in:
morris
2023-02-13 16:52:10 +08:00
committed by laokaiyao
parent 34ad5d8d29
commit eb7ccbd174
8 changed files with 237 additions and 0 deletions

View File

@@ -83,6 +83,10 @@ config SOC_SDM_SUPPORTED
bool
default y
config SOC_ANALOG_CMPR_SUPPORTED
bool
default y
config SOC_ETM_SUPPORTED
bool
default y

View File

@@ -305,10 +305,15 @@ typedef struct {
volatile gpio_ext_version_reg_t version;
} gpio_ext_dev_t;
// analog comparator is a stand alone peripheral, but it is connected to GPIO
// so we rename it to analog_cmpr_dev_t from user's perspective
typedef gpio_ext_dev_t analog_cmpr_dev_t;
extern gpio_sd_dev_t SDM;
extern gpio_glitch_filter_dev_t GLITCH_FILTER;
extern gpio_etm_dev_t GPIO_ETM;
extern gpio_ext_dev_t GPIO_EXT;
extern analog_cmpr_dev_t ANALOG_CMPR;
#ifndef __cplusplus
_Static_assert(sizeof(gpio_ext_dev_t) == 0x100, "Invalid size of gpio_ext_dev_t structure");

View File

@@ -45,6 +45,7 @@
#define SOC_RTC_MEM_SUPPORTED 1
#define SOC_I2S_SUPPORTED 1
#define SOC_SDM_SUPPORTED 1
#define SOC_ANALOG_CMPR_SUPPORTED 1
#define SOC_ETM_SUPPORTED 1
#define SOC_RMT_SUPPORTED 1
#define SOC_PARLIO_SUPPORTED 1

View File

@@ -44,6 +44,7 @@ PROVIDE ( HMAC = 0x6008D000 );
PROVIDE ( IO_MUX = 0x60090000 );
PROVIDE ( GPIO = 0x60091000 );
PROVIDE ( GPIO_EXT = 0x60091f00 );
PROVIDE ( ANALOG_CMPR = 0x60091f00 );
PROVIDE ( SDM = 0x60091f00 );
PROVIDE ( GLITCH_FILTER = 0x60091f30 );
PROVIDE ( GPIO_ETM = 0x60091f60 );