io_mux.h 712 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #pragma once
  7. #include "esp_err.h"
  8. #include "soc/clk_tree_defs.h"
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12. /**
  13. * @brief Set the clock source for IO MUX
  14. *
  15. * @note IO MUX clock is shared by submodules like SDM, Glitch Filter.
  16. * The submodule drivers should call this function to detect if the user set the clock differently.
  17. *
  18. * @param clk_src The clock source for IO MUX
  19. * @return
  20. * - ESP_OK: Success
  21. * - ESP_ERR_INVALID_STATE: The IO MUX has been set to another clock source
  22. */
  23. esp_err_t io_mux_set_clock_source(soc_module_clk_t clk_src);
  24. #ifdef __cplusplus
  25. }
  26. #endif