feat(adc): move adc periph enable/reset functions to ll layer

This commit is contained in:
gaoxu
2024-03-28 15:19:45 +08:00
parent 3f5037866b
commit e63d6582cc
14 changed files with 209 additions and 46 deletions

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -17,6 +17,7 @@
#include "soc/syscon_struct.h"
#include "soc/rtc_cntl_struct.h"
#include "soc/clk_tree_defs.h"
#include "soc/dport_reg.h"
#ifdef __cplusplus
extern "C" {
@@ -565,6 +566,25 @@ static inline void adc_oneshot_ll_disable_all_unit(void)
/*---------------------------------------------------------------
Common setting
---------------------------------------------------------------*/
/**
* @brief Enable the ADC clock
* @param enable true to enable, false to disable
*/
static inline void adc_ll_enable_bus_clock(bool enable)
{
(void)enable;
//For compatibility
}
/**
* @brief Reset ADC module
*/
static inline void adc_ll_reset_register(void)
{
//For compatibility
}
/**
* Set ADC module controller.
* There are five SAR ADC controllers: