mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
Merge branch 'feature/support_ana_cmpr_on_c5' into 'master'
feat(ana_cmpr): support ana cmpr on c5 Closes IDF-11081 See merge request espressif/esp-idf!35530
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <stdbool.h>
|
||||
#include "hal/misc.h"
|
||||
#include "hal/assert.h"
|
||||
#include "hal/ana_cmpr_types.h"
|
||||
#include "soc/ana_cmpr_struct.h"
|
||||
|
||||
#define ANALOG_CMPR_LL_GET_HW(unit) (&ANALOG_CMPR[unit])
|
||||
@@ -60,7 +61,7 @@ static inline uint32_t analog_cmpr_ll_get_internal_ref_voltage(analog_cmpr_dev_t
|
||||
* @param hw Analog comparator register base address
|
||||
* @param ref_src reference source, 0 for internal, 1 for external GPIO pad (GPIO10)
|
||||
*/
|
||||
static inline void analog_cmpr_ll_set_ref_source(analog_cmpr_dev_t *hw, uint32_t ref_src)
|
||||
static inline void analog_cmpr_ll_set_ref_source(analog_cmpr_dev_t *hw, ana_cmpr_ref_voltage_t ref_src)
|
||||
{
|
||||
hw->pad_comp_config->mode_comp = ref_src;
|
||||
}
|
||||
@@ -91,7 +92,7 @@ static inline void analog_cmpr_ll_set_cross_type(analog_cmpr_dev_t *hw, uint8_t
|
||||
* @return interrupt mask
|
||||
*/
|
||||
__attribute__((always_inline))
|
||||
static inline uint32_t analog_cmpr_ll_get_intr_mask_by_type(analog_cmpr_dev_t *hw, uint8_t type)
|
||||
static inline uint32_t analog_cmpr_ll_get_intr_mask_by_type(analog_cmpr_dev_t *hw, ana_cmpr_cross_type_t type)
|
||||
{
|
||||
(void)type;
|
||||
return ANALOG_CMPR_LL_EVENT_CROSS;
|
||||
|
Reference in New Issue
Block a user