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