refactor(ana_cmpr): enhanced the driver implementation

This commit is contained in:
morris
2025-04-11 17:45:32 +08:00
parent 771e9db73e
commit 2b5d91ad1c
44 changed files with 609 additions and 416 deletions
@@ -15,6 +15,8 @@
#define ANALOG_CMPR_LL_GET_HW(unit) (&ANALOG_CMPR[unit])
#define ANALOG_CMPR_LL_EVENT_CROSS (1 << 0)
#define ANALOG_CMPR_LL_ALL_INTR_MASK(unit) (ANALOG_CMPR_LL_EVENT_CROSS)
#ifdef __cplusplus
extern "C" {
#endif
@@ -77,7 +79,7 @@ static inline void analog_cmpr_ll_set_ref_source(analog_cmpr_dev_t *hw, ana_cmpr
* - 3: enable any positive or negative cross interrupt
*/
__attribute__((always_inline))
static inline void analog_cmpr_ll_set_cross_type(analog_cmpr_dev_t *hw, uint8_t type)
static inline void analog_cmpr_ll_set_intr_cross_type(analog_cmpr_dev_t *hw, ana_cmpr_cross_type_t type)
{
hw->pad_comp_config->zero_det_mode = type;
}