mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
refactor(ana_cmpr): enhanced the driver implementation
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user