reg_spi.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. /** @file reg_spi.h
  2. * @brief SPI 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 SPI driver.
  12. */
  13. /* (c) Texas Instruments 2009-2013, All rights reserved. */
  14. #ifndef __REG_SPI_H__
  15. #define __REG_SPI_H__
  16. #include "sys_common.h"
  17. #include "gio.h"
  18. /* USER CODE BEGIN (0) */
  19. /* USER CODE END */
  20. /* Spi Register Frame Definition */
  21. /** @struct spiBase
  22. * @brief SPI Register Definition
  23. *
  24. * This structure is used to access the SPI module registers.
  25. */
  26. /** @typedef spiBASE_t
  27. * @brief SPI Register Frame Type Definition
  28. *
  29. * This type is used to access the SPI Registers.
  30. */
  31. typedef volatile struct spiBase
  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 RESERVED[50U]; /**< 0x006C to 0x0130: Reserved */
  61. uint32 IOLPKTSTCR; /**< 0x0134: IO loopback */
  62. } spiBASE_t;
  63. /** @def spiREG1
  64. * @brief SPI1 (MIBSPI - Compatibility Mode) Register Frame Pointer
  65. *
  66. * This pointer is used by the SPI driver to access the spi module registers.
  67. */
  68. #define spiREG1 ((spiBASE_t *)0xFFF7F400U)
  69. /** @def spiPORT1
  70. * @brief SPI1 (MIBSPI - Compatibility Mode) GIO Port Register Pointer
  71. *
  72. * Pointer used by the GIO driver to access I/O PORT of SPI1
  73. * (use the GIO drivers to access the port pins).
  74. */
  75. #define spiPORT1 ((gioPORT_t *)0xFFF7F418U)
  76. /** @def spiREG2
  77. * @brief SPI2 Register Frame Pointer
  78. *
  79. * This pointer is used by the SPI driver to access the spi module registers.
  80. */
  81. #define spiREG2 ((spiBASE_t *)0xFFF7F600U)
  82. /** @def spiPORT2
  83. * @brief SPI2 GIO Port Register Pointer
  84. *
  85. * Pointer used by the GIO driver to access I/O PORT of SPI2
  86. * (use the GIO drivers to access the port pins).
  87. */
  88. #define spiPORT2 ((gioPORT_t *)0xFFF7F618U)
  89. /** @def spiREG3
  90. * @brief SPI3 (MIBSPI - Compatibility Mode) Register Frame Pointer
  91. *
  92. * This pointer is used by the SPI driver to access the spi module registers.
  93. */
  94. #define spiREG3 ((spiBASE_t *)0xFFF7F800U)
  95. /** @def spiPORT3
  96. * @brief SPI3 (MIBSPI - Compatibility Mode) GIO Port Register Pointer
  97. *
  98. * Pointer used by the GIO driver to access I/O PORT of SPI3
  99. * (use the GIO drivers to access the port pins).
  100. */
  101. #define spiPORT3 ((gioPORT_t *)0xFFF7F818U)
  102. /** @def spiREG4
  103. * @brief SPI4 Register Frame Pointer
  104. *
  105. * This pointer is used by the SPI driver to access the spi module registers.
  106. */
  107. #define spiREG4 ((spiBASE_t *)0xFFF7FA00U)
  108. /** @def spiPORT4
  109. * @brief SPI4 GIO Port Register Pointer
  110. *
  111. * Pointer used by the GIO driver to access I/O PORT of SPI4
  112. * (use the GIO drivers to access the port pins).
  113. */
  114. #define spiPORT4 ((gioPORT_t *)0xFFF7FA18U)
  115. /** @def spiREG5
  116. * @brief SPI5 (MIBSPI - Compatibility Mode) Register Frame Pointer
  117. *
  118. * This pointer is used by the SPI driver to access the spi module registers.
  119. */
  120. #define spiREG5 ((spiBASE_t *)0xFFF7FC00U)
  121. /** @def spiPORT5
  122. * @brief SPI5 (MIBSPI - Compatibility Mode) GIO Port Register Pointer
  123. *
  124. * Pointer used by the GIO driver to access I/O PORT of SPI5
  125. * (use the GIO drivers to access the port pins).
  126. */
  127. #define spiPORT5 ((gioPORT_t *)0xFFF7FC18U)
  128. /* USER CODE BEGIN (1) */
  129. /* USER CODE END */
  130. #endif