1 /*
2  * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 #pragma once
7 
8 #include "soc/periph_defs.h"
9 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
14 /**
15  * @brief Enable peripheral module by un-gating the clock and de-asserting the reset signal.
16  *
17  * @param[in] periph Peripheral module
18  *
19  * @note If @c periph_module_enable() is called a number of times,
20  *       @c periph_module_disable() has to be called the same number of times,
21  *       in order to put the peripheral into disabled state.
22  */
23 void periph_module_enable(periph_module_t periph);
24 
25 /**
26  * @brief Disable peripheral module by gating the clock and asserting the reset signal.
27  *
28  * @param[in] periph Peripheral module
29  *
30  * @note If @c periph_module_enable() is called a number of times,
31  *       @c periph_module_disable() has to be called the same number of times,
32  *       in order to put the peripheral into disabled state.
33  */
34 void periph_module_disable(periph_module_t periph);
35 
36 /**
37  * @brief Reset peripheral module by asserting and de-asserting the reset signal.
38  *
39  * @param[in] periph Peripheral module
40  *
41  * @note Calling this function does not enable or disable the clock for the module.
42  */
43 void periph_module_reset(periph_module_t periph);
44 
45 /**
46  * @brief Enable Wi-Fi and BT common module
47  *
48  * @note If @c wifi_bt_common_module_enable() is called a number of times,
49  *       @c wifi_bt_common_module_disable() has to be called the same number of times,
50  *       in order to put the peripheral into disabled state.
51  */
52 void wifi_bt_common_module_enable(void);
53 
54 /**
55  * @brief Disable Wi-Fi and BT common module
56  *
57  * @note If @c wifi_bt_common_module_enable() is called a number of times,
58  *       @c wifi_bt_common_module_disable() has to be called the same number of times,
59  *       in order to put the peripheral into disabled state.
60  */
61 void wifi_bt_common_module_disable(void);
62 
63 /**
64  * @brief Enable Wi-Fi module
65  *
66  * @note Calling this function will only enable Wi-Fi module.
67  */
68 void wifi_module_enable(void);
69 
70 /**
71  * @brief Disable Wi-Fi module
72  *
73  * @note Calling this function will only disable Wi-Fi module.
74  */
75 void wifi_module_disable(void);
76 
77 #ifdef __cplusplus
78 }
79 #endif
80