periph_ctrl.h 2.4 KB

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