You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

114 lines
3.0 KiB

8 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __GPIO_REGISTERS_MAP_HEADER__
  2. #define __GPIO_REGISTERS_MAP_HEADER__
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. typedef struct {
  7. union {
  8. volatile uint32_t REVISION;
  9. volatile struct {
  10. uint32_t Y_MINOR : 6; // 5:0
  11. uint32_t CUSTOM : 2; // 7:6
  12. uint32_t X_MAJOR : 3; // 10:8
  13. uint32_t R_RTL : 5; // 15:11
  14. uint32_t FUNC : 12; // 27:16
  15. uint32_t rsvd28 : 2; // 29:28
  16. uint32_t SCHEME : 2; // 31:30
  17. } REVISION_bit;
  18. }; // 0x0 - 0x3
  19. uint8_t rsvd1[12]; // 0x4 - 0xf
  20. union {
  21. volatile uint32_t SYSCONFIG;
  22. volatile struct {
  23. uint32_t AUTOIDLE : 1; // 0:0
  24. uint32_t SOFTRESET : 1; // 1:1
  25. uint32_t ENAWAKEUP : 1; // 2:2
  26. uint32_t IDLEMODE : 2; // 4:3
  27. uint32_t rsvd28 : 27; // 31:5
  28. } SYSCONFIG_bit;
  29. }; // 0x10 - 0x13
  30. uint8_t rsvd2[12]; // 0x14 - 0x1f
  31. union {
  32. volatile uint32_t EOI;
  33. volatile struct {
  34. uint32_t DMAEVT_ACK : 1; // 0:0
  35. uint32_t rsvd28 : 31; // 31:1
  36. } EOI_bit;
  37. }; // 0x20 - 0x23
  38. volatile uint32_t IRQSTS_RAW_0; // 0x24 - 0x27
  39. volatile uint32_t IRQSTS_RAW_1; // 0x28 - 0x2B
  40. volatile uint32_t IRQSTS_0; // 0x2C - 0x2F
  41. volatile uint32_t IRQSTS_1; // 0x30 - 0x33
  42. volatile uint32_t IRQSTS_SET_0; // 0x34 - 0x37
  43. volatile uint32_t IRQSTS_SET_1; // 0x38 - 0x3B
  44. volatile uint32_t IRQSTS_CLR_0; // 0x3C - 0x3F
  45. volatile uint32_t IRQSTS_CLR_1; // 0x40 - 0x43
  46. volatile uint32_t IRQWAKEN_0; // 0x44 - 0x47
  47. volatile uint32_t IRQWAKEN_1; // 0x48 - 0x4B
  48. uint8_t rsvd3[200]; // 0x4C - 0x113
  49. union {
  50. volatile uint32_t SYSSTS;
  51. volatile struct {
  52. uint32_t RESETDONE : 1; // 0:0
  53. uint32_t rsvd28 : 31; // 31:1
  54. } SYSSTS_bit;
  55. }; // 0x114 - 0x117
  56. uint8_t rsvd4[24]; // 0x118 - 0x12f
  57. union {
  58. volatile uint32_t CTRL;
  59. volatile struct {
  60. uint32_t DISABLEMODULE : 1; // 0:0
  61. uint32_t GATINGRATIO : 2; // 2:1
  62. uint32_t rsvd28 : 29; // 31:3
  63. } CTRL_bit;
  64. }; // 0x130 - 0x133
  65. union {
  66. volatile uint32_t OE;
  67. volatile uint32_t OUTPUTEN_N;
  68. }; // 0x134 - 0x137
  69. volatile uint32_t DATAIN; // 0x138 - 0x13b
  70. volatile uint32_t DATAOUT; // 0x13c - 0x13f
  71. union {
  72. volatile uint32_t LEVELDETECT0;
  73. volatile uint32_t LEVELDETECT0_N;
  74. }; // 0x140 - 0x143
  75. union {
  76. volatile uint32_t LEVELDETECT1;
  77. volatile uint32_t LEVELDETECT1_N;
  78. }; // 0x144 - 0x147
  79. union {
  80. volatile uint32_t RISINGDETECT;
  81. volatile uint32_t RISINGDETECT_N;
  82. }; // 0x148 - 0x14b
  83. union {
  84. volatile uint32_t FALLINGDETECT;
  85. volatile uint32_t FALLINGDETECT_N;
  86. }; // 0x14c - 0x14f
  87. union {
  88. volatile uint32_t DEBOUNCEN;
  89. volatile uint32_t DEBOUNCEN_N;
  90. }; // 0x150 - 0x153
  91. union {
  92. volatile uint32_t DEBOUNCINGTIME;
  93. volatile struct {
  94. uint32_t DEBOUNCINGTIME : 8; // 7:0
  95. uint32_t rsvd28 : 24; // 31:8
  96. } DEBOUNCINGTIME_bit;
  97. }; // 0x154 - 0x157
  98. union {
  99. volatile uint32_t CLRDATAOUT;
  100. volatile uint32_t CLRDATAOUT_N;
  101. }; // 0x158 - 0x15b
  102. union {
  103. volatile uint32_t SETDATAOUT;
  104. volatile uint32_t SETDATAOUT_N;
  105. }; // 0x15c - 0x15f
  106. } sysGPIOregs;
  107. #ifdef __cplusplus
  108. }
  109. #endif
  110. #endif