1 /*
2  * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #ifndef _DRIVER_PERIPH_CTRL_H_
8 #define _DRIVER_PERIPH_CTRL_H_
9 
10 #include "soc/periph_defs.h"
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 /**
17  * @brief      enable peripheral module
18  *
19  * @param[in]  periph    :  Peripheral module name
20  *
21  * Clock for the module will be ungated, and reset de-asserted.
22  *
23  * @note If periph_module_enable is called a number of times,
24  *       periph_module_disable has to be called the same number of times
25  *       in order to put the peripheral into disabled state.
26  *
27  * @return     NULL
28  *
29  */
30 void periph_module_enable(periph_module_t periph);
31 
32 /**
33  * @brief      disable peripheral module
34  *
35  * @param[in]  periph    :  Peripheral module name
36  *
37  * Clock for the module will be gated, reset asserted.
38  *
39  * @note If periph_module_enable is called a number of times,
40  *       periph_module_disable has to be called the same number of times
41  *       in order to put the peripheral into disabled state.
42  *
43  * @return     NULL
44  *
45  */
46 void periph_module_disable(periph_module_t periph);
47 
48 /**
49  * @brief      reset peripheral module
50  *
51  * @param[in]  periph    :  Peripheral module name
52  *
53  * Reset will asserted then de-assrted for the peripheral.
54  *
55  * Calling this function does not enable or disable the clock for the module.
56  *
57  * @return     NULL
58  *
59  */
60 void periph_module_reset(periph_module_t periph);
61 
62 /**
63  * @brief      enable wifi bt common module
64  *
65  * @note If wifi_bt_common_module_enable is called a number of times,
66  *       wifi_bt_common_module_disable has to be called the same number of times
67  *       in order to put the peripheral into disabled state.
68  *
69  * @return     NULL
70  *
71  */
72 void wifi_bt_common_module_enable(void);
73 
74 /**
75  * @brief      disable wifi bt common module
76  *
77  * @note If wifi_bt_common_module_enable is called a number of times,
78  *       wifi_bt_common_module_disable has to be called the same number of times
79  *       in order to put the peripheral into disabled state.
80  *
81  * @return     NULL
82  *
83  */
84 void wifi_bt_common_module_disable(void);
85 
86 /**
87  * @brief      enable wifi module
88  *
89  * @note Enable wifi module only.
90  *
91  * @return     NULL
92  *
93  */
94 void wifi_module_enable(void);
95 
96 /**
97  * @brief      disable wifi module
98  *
99  * @note Disable wifi module only.
100  *
101  * @return     NULL
102  *
103  */
104 void wifi_module_disable(void);
105 #ifdef __cplusplus
106 }
107 #endif
108 
109 #endif /* _DRIVER_PERIPH_CTRL_H_ */
110