periph_ctrl.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. // Copyright 2015-2016 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 "esp_err.h"
  16. #include "soc/soc.h"
  17. #include "soc/dport_reg.h"
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. typedef enum {
  22. PERIPH_LEDC_MODULE = 0,
  23. PERIPH_UART0_MODULE,
  24. PERIPH_UART1_MODULE,
  25. PERIPH_UART2_MODULE,
  26. PERIPH_I2C0_MODULE,
  27. PERIPH_I2C1_MODULE,
  28. PERIPH_I2S0_MODULE,
  29. PERIPH_I2S1_MODULE,
  30. PERIPH_TIMG0_MODULE,
  31. PERIPH_TIMG1_MODULE,
  32. PERIPH_PWM0_MODULE,
  33. PERIPH_PWM1_MODULE,
  34. PERIPH_PWM2_MODULE,
  35. PERIPH_PWM3_MODULE,
  36. PERIPH_UHCI0_MODULE,
  37. PERIPH_UHCI1_MODULE,
  38. } periph_module_t;
  39. /**
  40. * @brief enable peripheral module
  41. *
  42. * @param[in] periph : Peripheral module name
  43. *
  44. *
  45. * @return NULL
  46. *
  47. */
  48. void periph_module_enable(periph_module_t periph);
  49. /**
  50. * @brief disable peripheral module
  51. *
  52. * @param[in] periph : Peripheral module name
  53. *
  54. *
  55. * @return NULL
  56. *
  57. */
  58. void periph_module_disable(periph_module_t periph);
  59. #ifdef __cplusplus
  60. }
  61. #endif
  62. #endif /* _DRIVER_PERIPH_CTRL_H_ */