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.

130 lines
3.4 KiB

8 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*
  2. * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
  3. *
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that the following conditions
  7. * are met:
  8. *
  9. * * Redistributions of source code must retain the above copyright
  10. * notice, this list of conditions and the following disclaimer.
  11. *
  12. * * Redistributions in binary form must reproduce the above copyright
  13. * notice, this list of conditions and the following disclaimer in the
  14. * documentation and/or other materials provided with the
  15. * distribution.
  16. *
  17. * * Neither the name of Texas Instruments Incorporated nor the names of
  18. * its contributors may be used to endorse or promote products derived
  19. * from this software without specific prior written permission.
  20. *
  21. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  22. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  23. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  24. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  25. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  26. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  27. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  28. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  29. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  30. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  31. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  32. */
  33. #ifndef _PRU_ECAP_H_
  34. #define _PRU_ECAP_H_
  35. /* PRU ECAP register set */
  36. typedef struct {
  37. /* PRU_ECAP_TSCTR register bit field */
  38. union {
  39. volatile uint32_t TSCTR;
  40. volatile struct {
  41. uint32_t TSCTR : 32; // 31:0
  42. } TSCTR_bit;
  43. }; // 0x0
  44. /* PRU_ECAP_CTRPHS register bit field */
  45. union {
  46. volatile uint32_t CTRPHS;
  47. volatile struct {
  48. uint32_t CTRPHS : 32; // 31:0
  49. } CTRPHS_bit;
  50. }; // 0x4
  51. /* PRU_ECAP_CAP1 register bit field */
  52. union {
  53. volatile uint32_t CAP1;
  54. volatile struct {
  55. uint32_t CAP1 : 32; // 31:0
  56. } CAP1_bit;
  57. }; // 0x8
  58. /* PRU_ECAP_CAP2 register bit field */
  59. union {
  60. volatile uint32_t CAP2;
  61. volatile struct {
  62. uint32_t CAP2 : 32; // 31:0
  63. } CAP2_bit;
  64. }; // 0xc
  65. /* PRU_ECAP_CAP3 register bit field */
  66. union {
  67. volatile uint32_t CAP3;
  68. volatile struct {
  69. uint32_t CAP3 : 32; // 31:0
  70. } CAP3_bit;
  71. }; // 0x10
  72. /* PRU_ECAP_CAP4 register bit field */
  73. union {
  74. volatile uint32_t CAP4;
  75. volatile struct {
  76. uint32_t CAP4 : 32; // 31:0
  77. } CAP4_bit;
  78. }; // 0x14
  79. uint8_t rsvd18[16]; // 0x18 - 0x27
  80. /* PRU_ECAP_ECCTL1 register bit field */
  81. volatile uint16_t ECCTL1; // 0x28
  82. /* PRU_ECAP_ECCTL2 register bit field */
  83. volatile uint16_t ECCTL2; // 0x2a
  84. /* PRU_ECAP_ECEINT register bit field */
  85. volatile uint16_t ECEINT; // 0x2c
  86. /* PRU_ECAP_ECFLG register bit field */
  87. volatile uint16_t ECFLG; // 0x2e
  88. /* PRU_ECAP_ECCLR register bit field */
  89. volatile uint16_t ECCLR; // 0x30
  90. /* PRU_ECAP_ECFRC register bit field */
  91. volatile uint16_t ECFRC; // 0x32
  92. uint8_t rsvd34[40]; // 0x34 - 0x5b
  93. /* PRU_ECAP_REVID register bit field */
  94. union {
  95. volatile uint32_t REVID;
  96. volatile struct {
  97. uint32_t REV : 32; // 31:0
  98. } REVID_bit;
  99. }; // 0x5c
  100. } pruEcap;
  101. volatile __far pruEcap CT_ECAP __attribute__((cregister("PRU_ECAP", near), peripheral));
  102. #endif /* _PRU_ECAP_H_ */