periph_ctrl.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. // Copyright 2015-2018 Espressif Systems (Shanghai) PTE LTD
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. // http://www.apache.org/licenses/LICENSE-2.0
  7. //
  8. // Unless required by applicable law or agreed to in writing, software
  9. // distributed under the License is distributed on an "AS IS" BASIS,
  10. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. // See the License for the specific language governing permissions and
  12. // limitations under the License.
  13. #ifndef _DRIVER_PERIPH_CTRL_H_
  14. #define _DRIVER_PERIPH_CTRL_H_
  15. #include "soc/periph_defs.h"
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. /**
  20. * @brief enable peripheral module
  21. *
  22. * @param[in] periph : Peripheral module name
  23. *
  24. * Clock for the module will be ungated, and reset de-asserted.
  25. *
  26. * @return NULL
  27. *
  28. */
  29. void periph_module_enable(periph_module_t periph);
  30. /**
  31. * @brief disable peripheral module
  32. *
  33. * @param[in] periph : Peripheral module name
  34. *
  35. * Clock for the module will be gated, reset asserted.
  36. *
  37. * @return NULL
  38. *
  39. */
  40. void periph_module_disable(periph_module_t periph);
  41. /**
  42. * @brief reset peripheral module
  43. *
  44. * @param[in] periph : Peripheral module name
  45. *
  46. * Reset will asserted then de-assrted for the peripheral.
  47. *
  48. * Calling this function does not enable or disable the clock for the module.
  49. *
  50. * @return NULL
  51. *
  52. */
  53. void periph_module_reset(periph_module_t periph);
  54. /**
  55. * @brief enable wifi bt common module
  56. *
  57. * @note If wifi_bt_common_module_enable is called a number of times,
  58. * 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. * @return NULL
  62. *
  63. */
  64. void wifi_bt_common_module_enable(void);
  65. /**
  66. * @brief disable wifi bt common module
  67. *
  68. * @note If wifi_bt_common_module_enable is called a number of times,
  69. * wifi_bt_common_module_disable has to be called the same number of times
  70. * in order to put the peripheral into disabled state.
  71. *
  72. * @return NULL
  73. *
  74. */
  75. void wifi_bt_common_module_disable(void);
  76. #ifdef __cplusplus
  77. }
  78. #endif
  79. #endif /* _DRIVER_PERIPH_CTRL_H_ */