reg_mibspi.h 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. /** @file reg_mibspi.h
  2. * @brief MIBSPI Register Layer Header File
  3. * @date 29.May.2013
  4. * @version 03.05.02
  5. *
  6. * This file contains:
  7. * - Definitions
  8. * - Types
  9. * - Interface Prototypes
  10. * .
  11. * which are relevant for the MIBSPI driver.
  12. */
  13. /* (c) Texas Instruments 2009-2013, All rights reserved. */
  14. #ifndef __REG_MIBSPI_H__
  15. #define __REG_MIBSPI_H__
  16. #include "sys_common.h"
  17. #include "gio.h"
  18. /* USER CODE BEGIN (0) */
  19. /* USER CODE END */
  20. /* Mibspi Register Frame Definition */
  21. /** @struct mibspiBase
  22. * @brief MIBSPI Register Definition
  23. *
  24. * This structure is used to access the MIBSPI module registers.
  25. */
  26. /** @typedef mibspiBASE_t
  27. * @brief MIBSPI Register Frame Type Definition
  28. *
  29. * This type is used to access the MIBSPI Registers.
  30. */
  31. typedef volatile struct mibspiBase
  32. {
  33. uint32 GCR0; /**< 0x0000: Global Control 0 */
  34. uint32 GCR1; /**< 0x0004: Global Control 1 */
  35. uint32 INT0; /**< 0x0008: Interrupt Register */
  36. uint32 LVL; /**< 0x000C: Interrupt Level */
  37. uint32 FLG; /**< 0x0010: Interrupt flags */
  38. uint32 PCFUN; /**< 0x0014: Function Pin Enable */
  39. uint32 PCDIR; /**< 0x0018: Pin Direction */
  40. uint32 PCDIN; /**< 0x001C: Pin Input Latch */
  41. uint32 PCDOUT; /**< 0x0020: Pin Output Latch */
  42. uint32 PCSET; /**< 0x0024: Output Pin Set */
  43. uint32 PCCLR; /**< 0x0028: Output Pin Clr */
  44. uint32 PCPDR; /**< 0x002C: Open Drain Output Enable */
  45. uint32 PCDIS; /**< 0x0030: Pullup/Pulldown Disable */
  46. uint32 PCPSL; /**< 0x0034: Pullup/Pulldown Selection */
  47. uint32 DAT0; /**< 0x0038: Transmit Data */
  48. uint32 DAT1; /**< 0x003C: Transmit Data with Format and Chip Select */
  49. uint32 BUF; /**< 0x0040: Receive Buffer */
  50. uint32 EMU; /**< 0x0044: Emulation Receive Buffer */
  51. uint32 DELAY; /**< 0x0048: Delays */
  52. uint32 CSDEF; /**< 0x004C: Default Chip Select */
  53. uint32 FMT0; /**< 0x0050: Data Format 0 */
  54. uint32 FMT1; /**< 0x0054: Data Format 1 */
  55. uint32 FMT2; /**< 0x0058: Data Format 2 */
  56. uint32 FMT3; /**< 0x005C: Data Format 3 */
  57. uint32 INTVECT0; /**< 0x0060: Interrupt Vector 0 */
  58. uint32 INTVECT1; /**< 0x0064: Interrupt Vector 1 */
  59. uint32 SRSEL; /**< 0x0068: Slew Rate Select */
  60. uint32 PMCTRL; /**< 0x006C: Parallel Mode Control */
  61. uint32 MIBSPIE; /**< 0x0070: Multi-buffer Mode Enable */
  62. uint32 TGITENST; /**< 0x0074: TG Interrupt Enable Set */
  63. uint32 TGITENCR; /**< 0x0078: TG Interrupt Enable Clear */
  64. uint32 TGITLVST; /**< 0x007C: Transfer Group Interrupt Level Set */
  65. uint32 TGITLVCR; /**< 0x0080: Transfer Group Interrupt Level Clear */
  66. uint32 TGINTFLG; /**< 0x0084: Transfer Group Interrupt Flag */
  67. uint32 rsvd1[2U]; /**< 0x0088: Reserved */
  68. uint32 TICKCNT; /**< 0x0090: Tick Counter */
  69. uint32 LTGPEND; /**< 0x0090: Last TG End Pointer */
  70. uint32 TGCTRL[16U]; /**< 0x0098 - 0x00D4: Transfer Group Control */
  71. uint32 DMACTRL[8U]; /**< 0x00D8 - 0x00F4: DMA Control */
  72. uint32 DMACOUNT[8U]; /**< 0x00F8 - 0x0114: DMA Count */
  73. uint32 DMACNTLEN; /**< 0x0118 - 0x0114: DMA Control length */
  74. uint32 rsvd2; /**< 0x011C: Reserved */
  75. uint32 UERRCTRL; /**< 0x0120: Multi-buffer RAM Uncorrectable Parity Error Control */
  76. uint32 UERRSTAT; /**< 0x0124: Multi-buffer RAM Uncorrectable Parity Error Status */
  77. uint32 UERRADDRRX; /**< 0x0128: RXRAM Uncorrectable Parity Error Address */
  78. uint32 UERRADDRTX; /**< 0x012C: TXRAM Uncorrectable Parity Error Address */
  79. uint32 RXOVRN_BUF_ADDR; /**< 0x0130: RXRAM Overrun Buffer Address */
  80. uint32 IOLPKTSTCR; /**< 0x0134: IO loopback */
  81. uint32 EXT_PRESCALE1; /**< 0x0138: */
  82. uint32 EXT_PRESCALE2; /**< 0x013C: */
  83. } mibspiBASE_t;
  84. /** @def mibspiREG1
  85. * @brief MIBSPI1 Register Frame Pointer
  86. *
  87. * This pointer is used by the MIBSPI driver to access the mibspi module registers.
  88. */
  89. #define mibspiREG1 ((mibspiBASE_t *)0xFFF7F400U)
  90. /** @def mibspiPORT1
  91. * @brief MIBSPI1 GIO Port Register Pointer
  92. *
  93. * Pointer used by the GIO driver to access I/O PORT of MIBSPI1
  94. * (use the GIO drivers to access the port pins).
  95. */
  96. #define mibspiPORT1 ((gioPORT_t *)0xFFF7F418U)
  97. /** @def mibspiREG3
  98. * @brief MIBSPI3 Register Frame Pointer
  99. *
  100. * This pointer is used by the MIBSPI driver to access the mibspi module registers.
  101. */
  102. #define mibspiREG3 ((mibspiBASE_t *)0xFFF7F800U)
  103. /** @def mibspiPORT3
  104. * @brief MIBSPI3 GIO Port Register Pointer
  105. *
  106. * Pointer used by the GIO driver to access I/O PORT of MIBSPI3
  107. * (use the GIO drivers to access the port pins).
  108. */
  109. #define mibspiPORT3 ((gioPORT_t *)0xFFF7F818U)
  110. /** @def mibspiREG5
  111. * @brief MIBSPI5 Register Frame Pointer
  112. *
  113. * This pointer is used by the MIBSPI driver to access the mibspi module registers.
  114. */
  115. #define mibspiREG5 ((mibspiBASE_t *)0xFFF7FC00U)
  116. /** @def mibspiPORT5
  117. * @brief MIBSPI5 GIO Port Register Pointer
  118. *
  119. * Pointer used by the GIO driver to access I/O PORT of MIBSPI5
  120. * (use the GIO drivers to access the port pins).
  121. */
  122. #define mibspiPORT5 ((gioPORT_t *)0xFFF7FC18U)
  123. /** @struct mibspiRamBase
  124. * @brief MIBSPI Buffer RAM Definition
  125. *
  126. * This structure is used to access the MIBSPI buffer memory.
  127. */
  128. /** @typedef mibspiRAM_t
  129. * @brief MIBSPI RAM Type Definition
  130. *
  131. * This type is used to access the MIBSPI RAM.
  132. */
  133. typedef volatile struct mibspiRamBase
  134. {
  135. struct
  136. {
  137. #if ((__little_endian__ == 1) || (__LITTLE_ENDIAN__ == 1))
  138. uint16 data; /**< tx buffer data */
  139. uint16 control; /**< tx buffer control */
  140. #else
  141. uint16 control; /**< tx buffer control */
  142. uint16 data; /**< tx buffer data */
  143. #endif
  144. } tx[128];
  145. struct
  146. {
  147. #if ((__little_endian__ == 1) || (__LITTLE_ENDIAN__ == 1))
  148. uint16 data; /**< rx buffer data */
  149. uint16 flags; /**< rx buffer flags */
  150. #else
  151. uint16 flags; /**< rx buffer flags */
  152. uint16 data; /**< rx buffer data */
  153. #endif
  154. } rx[128];
  155. } mibspiRAM_t;
  156. /** @def mibspiRAM1
  157. * @brief MIBSPI1 Buffer RAM Pointer
  158. *
  159. * This pointer is used by the MIBSPI driver to access the mibspi buffer memory.
  160. */
  161. #define mibspiRAM1 ((mibspiRAM_t *)0xFF0E0000U)
  162. /** @def mibspiRAM3
  163. * @brief MIBSPI3 Buffer RAM Pointer
  164. *
  165. * This pointer is used by the MIBSPI driver to access the mibspi buffer memory.
  166. */
  167. #define mibspiRAM3 ((mibspiRAM_t *)0xFF0C0000U)
  168. /** @def mibspiRAM5
  169. * @brief MIBSPI5 Buffer RAM Pointer
  170. *
  171. * This pointer is used by the MIBSPI driver to access the mibspi buffer memory.
  172. */
  173. #define mibspiRAM5 ((mibspiRAM_t *)0xFF0A0000U)
  174. /** @def mibspiPARRAM1
  175. * @brief MIBSPI1 Buffer RAM PARITY Pointer
  176. *
  177. * This pointer is used by the MIBSPI driver to access the mibspi buffer memory.
  178. */
  179. #define mibspiPARRAM1 (*(volatile uint32 *)(0xFF0E0000U + 0x00000400U))
  180. /** @def mibspiPARRAM3
  181. * @brief MIBSPI3 Buffer RAM PARITY Pointer
  182. *
  183. * This pointer is used by the MIBSPI driver to access the mibspi buffer memory.
  184. */
  185. #define mibspiPARRAM3 (*(volatile uint32 *)(0xFF0C0000U + 0x00000400U))
  186. /** @def mibspiPARRAM5
  187. * @brief MIBSPI5 Buffer RAM PARITY Pointer
  188. *
  189. * This pointer is used by the MIBSPI driver to access the mibspi buffer memory.
  190. */
  191. #define mibspiPARRAM5 (*(volatile uint32 *)(0xFF0A0000U + 0x00000400U))
  192. /* USER CODE BEGIN (1) */
  193. /* USER CODE END */
  194. #endif