clk_ctrl_os.h 1.1 KB

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