1 /*
2  * SPDX-FileCopyrightText: 2020-2021 Espressif Systems (Shanghai) CO LTD
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #include "soc/rtc.h"
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 /**
14  * @brief This function is used to enable the digital 8m rtc clock,
15  *        to support the peripherals.
16  *
17  * @note If this function is called a number of times, the `periph_rtc_dig_clk8m_disable`
18  *       function needs to be called same times to disable.
19  *
20  * @return true: success for enable the rtc 8M clock, false: rtc 8M clock enable failed
21  */
22 bool periph_rtc_dig_clk8m_enable(void);
23 
24 /**
25  * @brief This function is used to disable the rtc digital clock, which should be called
26  *        with the `periph_rtc_dig_clk8m_enable` pairedly
27  *
28  * @note If this function is called a number of times, the `periph_rtc_dig_clk8m_disable`
29  *       function needs to be called same times to disable.
30  */
31 void periph_rtc_dig_clk8m_disable(void);
32 
33 /**
34  * @brief This function is used to get the real clock frequency value of the rtc clock
35  *
36  * @return The real clock value
37  */
38 uint32_t periph_rtc_dig_clk8m_get_freq(void);
39 
40 #ifdef __cplusplus
41 }
42 #endif
43