gpio_periph.c 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. // Copyright 2020 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. // ESP32H2-TODO: IDF-3439
  16. const uint32_t GPIO_PIN_MUX_REG[SOC_GPIO_PIN_COUNT] = {
  17. IO_MUX_GPIO0_REG,
  18. IO_MUX_GPIO1_REG,
  19. IO_MUX_GPIO2_REG,
  20. IO_MUX_GPIO3_REG,
  21. IO_MUX_GPIO4_REG,
  22. IO_MUX_GPIO5_REG,
  23. IO_MUX_GPIO6_REG,
  24. IO_MUX_GPIO7_REG,
  25. IO_MUX_GPIO8_REG,
  26. IO_MUX_GPIO9_REG,
  27. IO_MUX_GPIO10_REG,
  28. IO_MUX_GPIO11_REG,
  29. IO_MUX_GPIO12_REG,
  30. IO_MUX_GPIO13_REG,
  31. IO_MUX_GPIO14_REG,
  32. IO_MUX_GPIO15_REG,
  33. IO_MUX_GPIO16_REG,
  34. IO_MUX_GPIO17_REG,
  35. IO_MUX_GPIO18_REG,
  36. IO_MUX_GPIO19_REG,
  37. IO_MUX_GPIO20_REG,
  38. IO_MUX_GPIO21_REG,
  39. };
  40. const uint32_t GPIO_HOLD_MASK[SOC_GPIO_PIN_COUNT] = {
  41. BIT(0), //GPIO0
  42. BIT(1), //GPIO1
  43. BIT(2), //GPIO2
  44. BIT(3), //GPIO3
  45. BIT(4), //GPIO4
  46. BIT(5), //GPIO5
  47. BIT(5), //GPIO6
  48. BIT(6), //GPIO7
  49. BIT(3), //GPIO8
  50. BIT(4), //GPIO9
  51. BIT(0), //GPIO10
  52. BIT(15), //GPIO11
  53. BIT(10), //GPIO12
  54. BIT(12), //GPIO13
  55. BIT(8), //GPIO14
  56. BIT(7), //GPIO15
  57. BIT(9), //GPIO16
  58. BIT(11), //GPIO17
  59. BIT(1), //GPIO18
  60. BIT(2), //GPIO19
  61. BIT(13), //GPIO20
  62. BIT(14), //GPIO21
  63. };