gpio_periph.c 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. // Copyright 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. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. #include "soc/gpio_periph.h"
  15. const uint32_t GPIO_PIN_MUX_REG[SOC_GPIO_PIN_COUNT] = {
  16. IO_MUX_GPIO0_REG,
  17. IO_MUX_GPIO1_REG,
  18. IO_MUX_GPIO2_REG,
  19. IO_MUX_GPIO3_REG,
  20. IO_MUX_GPIO4_REG,
  21. IO_MUX_GPIO5_REG,
  22. IO_MUX_GPIO6_REG,
  23. IO_MUX_GPIO7_REG,
  24. IO_MUX_GPIO8_REG,
  25. IO_MUX_GPIO9_REG,
  26. IO_MUX_GPIO10_REG,
  27. IO_MUX_GPIO11_REG,
  28. IO_MUX_GPIO12_REG,
  29. IO_MUX_GPIO13_REG,
  30. IO_MUX_GPIO14_REG,
  31. IO_MUX_GPIO15_REG,
  32. IO_MUX_GPIO16_REG,
  33. IO_MUX_GPIO17_REG,
  34. IO_MUX_GPIO18_REG,
  35. IO_MUX_GPIO19_REG,
  36. IO_MUX_GPIO20_REG,
  37. IO_MUX_GPIO21_REG,
  38. 0,
  39. 0,
  40. 0,
  41. 0,
  42. IO_MUX_GPIO26_REG,
  43. IO_MUX_GPIO27_REG,
  44. IO_MUX_GPIO28_REG,
  45. IO_MUX_GPIO29_REG,
  46. IO_MUX_GPIO30_REG,
  47. IO_MUX_GPIO31_REG,
  48. IO_MUX_GPIO32_REG,
  49. IO_MUX_GPIO33_REG,
  50. IO_MUX_GPIO34_REG,
  51. IO_MUX_GPIO35_REG,
  52. IO_MUX_GPIO36_REG,
  53. IO_MUX_GPIO37_REG,
  54. IO_MUX_GPIO38_REG,
  55. IO_MUX_GPIO39_REG,
  56. IO_MUX_GPIO40_REG,
  57. IO_MUX_GPIO41_REG,
  58. IO_MUX_GPIO42_REG,
  59. IO_MUX_GPIO43_REG,
  60. IO_MUX_GPIO44_REG,
  61. IO_MUX_GPIO45_REG,
  62. IO_MUX_GPIO46_REG,
  63. 0,
  64. };
  65. const uint32_t GPIO_HOLD_MASK[SOC_GPIO_PIN_COUNT] = {
  66. 0,
  67. 0,
  68. 0,
  69. 0,
  70. 0,
  71. 0,
  72. 0,
  73. 0,
  74. 0,
  75. 0,
  76. 0,
  77. 0,
  78. 0,
  79. 0,
  80. 0,
  81. 0,
  82. 0,
  83. 0,
  84. 0,
  85. 0,
  86. 0,
  87. 0,
  88. BIT(1),
  89. BIT(2),
  90. BIT(3),
  91. BIT(4),
  92. BIT(5),
  93. BIT(6),
  94. BIT(7),
  95. BIT(8),
  96. BIT(9),
  97. BIT(10),
  98. BIT(11),
  99. BIT(12),
  100. BIT(13),
  101. BIT(14),
  102. BIT(15),
  103. BIT(16),
  104. BIT(17),
  105. BIT(18),
  106. BIT(19),
  107. BIT(20),
  108. BIT(21),
  109. BIT(22),
  110. BIT(23),
  111. BIT(24),
  112. BIT(25),
  113. BIT(26),
  114. };