esp_clk_internal.h 977 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #pragma once
  7. #include "sdkconfig.h"
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11. /**
  12. * @file esp_clk_internal.h
  13. *
  14. * Private clock-related functions
  15. */
  16. /**
  17. * @brief Initialize clock-related settings
  18. *
  19. * Called from cpu_start.c, not intended to be called from other places.
  20. * This function configures the CPU clock, RTC slow and fast clocks, and
  21. * performs RTC slow clock calibration.
  22. */
  23. void esp_clk_init(void);
  24. /**
  25. * @brief Disables clock of some peripherals
  26. *
  27. * Called from cpu_start.c, not intended to be called from other places.
  28. * This function disables clock of useless peripherals when cpu starts.
  29. */
  30. void esp_perip_clk_init(void);
  31. #if !CONFIG_IDF_TARGET_ESP32C2
  32. /* Selects an external clock source (32 kHz) for RTC.
  33. * Only internal use in unit test.
  34. */
  35. void rtc_clk_select_rtc_slow_clk(void);
  36. #endif
  37. #ifdef __cplusplus
  38. }
  39. #endif