RTE_Device.h 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. /*
  2. * The Clear BSD License
  3. * Copyright (c) 2016, Freescale Semiconductor, Inc.
  4. * Copyright 2016-2017 NXP
  5. * All rights reserved.
  6. *
  7. * Redistribution and use in source and binary forms, with or without modification,
  8. * are permitted (subject to the limitations in the disclaimer below) provided
  9. * that the following conditions are met:
  10. *
  11. * o Redistributions of source code must retain the above copyright notice, this list
  12. * of conditions and the following disclaimer.
  13. *
  14. * o Redistributions in binary form must reproduce the above copyright notice, this
  15. * list of conditions and the following disclaimer in the documentation and/or
  16. * other materials provided with the distribution.
  17. *
  18. * o Neither the name of the copyright holder nor the names of its
  19. * contributors may be used to endorse or promote products derived from this
  20. * software without specific prior written permission.
  21. *
  22. * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE.
  23. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  24. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  25. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  26. * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
  27. * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  28. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  29. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  30. * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  31. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  32. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  33. */
  34. #ifndef __RTE_DEVICE_H
  35. #define __RTE_DEVICE_H
  36. /* UART Select, UART0-UART7. */
  37. /* User needs to provide the implementation for XXX_GetFreq/XXX_InitPins/XXX_DeinitPins
  38. in the application for enabling according instance. */
  39. #define RTE_USART0 0
  40. #define RTE_USART0_DMA_EN 0
  41. #define RTE_USART1 0
  42. #define RTE_USART1_DMA_EN 0
  43. #define RTE_USART2 0
  44. #define RTE_USART2_DMA_EN 0
  45. #define RTE_USART3 0
  46. #define RTE_USART3_DMA_EN 0
  47. #define RTE_USART4 0
  48. #define RTE_USART4_DMA_EN 0
  49. #define RTE_USART5 0
  50. #define RTE_USART5_DMA_EN 0
  51. #define RTE_USART6 0
  52. #define RTE_USART6_DMA_EN 0
  53. #define RTE_USART7 0
  54. #define RTE_USART7_DMA_EN 0
  55. /* USART configuration. */
  56. #define USART_RX_BUFFER_LEN 64
  57. #define USART0_RX_BUFFER_ENABLE 0
  58. #define USART1_RX_BUFFER_ENABLE 0
  59. #define USART2_RX_BUFFER_ENABLE 0
  60. #define USART3_RX_BUFFER_ENABLE 0
  61. #define USART4_RX_BUFFER_ENABLE 0
  62. #define USART5_RX_BUFFER_ENABLE 0
  63. #define USART6_RX_BUFFER_ENABLE 0
  64. #define USART7_RX_BUFFER_ENABLE 0
  65. #define RTE_USART0_DMA_TX_CH 1
  66. #define RTE_USART0_DMA_TX_DMA_BASE DMA0
  67. #define RTE_USART0_DMA_RX_CH 0
  68. #define RTE_USART0_DMA_RX_DMA_BASE DMA0
  69. #define RTE_USART1_DMA_TX_CH 3
  70. #define RTE_USART1_DMA_TX_DMA_BASE DMA0
  71. #define RTE_USART1_DMA_RX_CH 2
  72. #define RTE_USART1_DMA_RX_DMA_BASE DMA0
  73. #define RTE_USART2_DMA_TX_CH 5
  74. #define RTE_USART2_DMA_TX_DMA_BASE DMA0
  75. #define RTE_USART2_DMA_RX_CH 4
  76. #define RTE_USART2_DMA_RX_DMA_BASE DMA0
  77. #define RTE_USART3_DMA_TX_CH 7
  78. #define RTE_USART3_DMA_TX_DMA_BASE DMA0
  79. #define RTE_USART3_DMA_RX_CH 6
  80. #define RTE_USART3_DMA_RX_DMA_BASE DMA0
  81. #define RTE_USART4_DMA_TX_CH 9
  82. #define RTE_USART4_DMA_TX_DMA_BASE DMA0
  83. #define RTE_USART4_DMA_RX_CH 8
  84. #define RTE_USART4_DMA_RX_DMA_BASE DMA0
  85. #define RTE_USART5_DMA_TX_CH 11
  86. #define RTE_USART5_DMA_TX_DMA_BASE DMA0
  87. #define RTE_USART5_DMA_RX_CH 10
  88. #define RTE_USART5_DMA_RX_DMA_BASE DMA0
  89. #define RTE_USART6_DMA_TX_CH 13
  90. #define RTE_USART6_DMA_TX_DMA_BASE DMA0
  91. #define RTE_USART6_DMA_RX_CH 12
  92. #define RTE_USART6_DMA_RX_DMA_BASE DMA0
  93. #define RTE_USART7_DMA_TX_CH 15
  94. #define RTE_USART7_DMA_TX_DMA_BASE DMA0
  95. #define RTE_USART7_DMA_RX_CH 14
  96. #define RTE_USART7_DMA_RX_DMA_BASE DMA0
  97. /* I2C Select, I2C0 -I2C7*/
  98. /* User needs to provide the implementation for XXX_GetFreq/XXX_InitPins/XXX_DeinitPins
  99. in the application for enabling according instance. */
  100. #define RTE_I2C0 0
  101. #define RTE_I2C0_DMA_EN 0
  102. #define RTE_I2C1 0
  103. #define RTE_I2C1_DMA_EN 0
  104. #define RTE_I2C2 0
  105. #define RTE_I2C2_DMA_EN 0
  106. #define RTE_I2C3 0
  107. #define RTE_I2C3_DMA_EN 0
  108. #define RTE_I2C4 0
  109. #define RTE_I2C4_DMA_EN 0
  110. #define RTE_I2C5 0
  111. #define RTE_I2C5_DMA_EN 0
  112. #define RTE_I2C6 0
  113. #define RTE_I2C6_DMA_EN 0
  114. #define RTE_I2C7 0
  115. #define RTE_I2C7_DMA_EN 0
  116. /*I2C configuration*/
  117. #define RTE_I2C0_Master_DMA_BASE DMA0
  118. #define RTE_I2C0_Master_DMA_CH 1
  119. #define RTE_I2C1_Master_DMA_BASE DMA0
  120. #define RTE_I2C1_Master_DMA_CH 3
  121. #define RTE_I2C2_Master_DMA_BASE DMA0
  122. #define RTE_I2C2_Master_DMA_CH 5
  123. #define RTE_I2C3_Master_DMA_BASE DMA0
  124. #define RTE_I2C3_Master_DMA_CH 7
  125. #define RTE_I2C4_Master_DMA_BASE DMA0
  126. #define RTE_I2C4_Master_DMA_CH 9
  127. #define RTE_I2C5_Master_DMA_BASE DMA0
  128. #define RTE_I2C5_Master_DMA_CH 11
  129. #define RTE_I2C6_Master_DMA_BASE DMA0
  130. #define RTE_I2C6_Master_DMA_CH 13
  131. #define RTE_I2C7_Master_DMA_BASE DMA0
  132. #define RTE_I2C7_Master_DMA_CH 15
  133. /* SPI select, SPI0 - SPI7.*/
  134. /* User needs to provide the implementation for XXX_GetFreq/XXX_InitPins/XXX_DeinitPins
  135. in the application for enabling according instance. */
  136. #define RTE_SPI0 0
  137. #define RTE_SPI0_DMA_EN 0
  138. #define RTE_SPI1 0
  139. #define RTE_SPI1_DMA_EN 0
  140. #define RTE_SPI2 0
  141. #define RTE_SPI2_DMA_EN 0
  142. #define RTE_SPI3 0
  143. #define RTE_SPI3_DMA_EN 0
  144. #define RTE_SPI4 0
  145. #define RTE_SPI4_DMA_EN 0
  146. #define RTE_SPI5 0
  147. #define RTE_SPI5_DMA_EN 0
  148. #define RTE_SPI6 0
  149. #define RTE_SPI6_DMA_EN 0
  150. #define RTE_SPI7 0
  151. #define RTE_SPI7_DMA_EN 0
  152. /* SPI configuration. */
  153. #define RTE_SPI0_SSEL_NUM kSPI_Ssel0
  154. #define RTE_SPI0_DMA_TX_CH 1
  155. #define RTE_SPI0_DMA_TX_DMA_BASE DMA0
  156. #define RTE_SPI0_DMA_RX_CH 0
  157. #define RTE_SPI0_DMA_RX_DMA_BASE DMA0
  158. #define RTE_SPI1_SSEL_NUM kSPI_Ssel0
  159. #define RTE_SPI1_DMA_TX_CH 3
  160. #define RTE_SPI1_DMA_TX_DMA_BASE DMA0
  161. #define RTE_SPI1_DMA_RX_CH 2
  162. #define RTE_SPI1_DMA_RX_DMA_BASE DMA0
  163. #define RTE_SPI2_SSEL_NUM kSPI_Ssel0
  164. #define RTE_SPI2_DMA_TX_CH 5
  165. #define RTE_SPI2_DMA_TX_DMA_BASE DMA0
  166. #define RTE_SPI2_DMA_RX_CH 4
  167. #define RTE_SPI2_DMA_RX_DMA_BASE DMA0
  168. #define RTE_SPI3_SSEL_NUM kSPI_Ssel0
  169. #define RTE_SPI3_DMA_TX_CH 7
  170. #define RTE_SPI3_DMA_TX_DMA_BASE DMA0
  171. #define RTE_SPI3_DMA_RX_CH 6
  172. #define RTE_SPI3_DMA_RX_DMA_BASE DMA0
  173. #define RTE_SPI4_SSEL_NUM kSPI_Ssel0
  174. #define RTE_SPI4_DMA_TX_CH 9
  175. #define RTE_SPI4_DMA_TX_DMA_BASE DMA0
  176. #define RTE_SPI4_DMA_RX_CH 8
  177. #define RTE_SPI4_DMA_RX_DMA_BASE DMA0
  178. #define RTE_SPI5_SSEL_NUM kSPI_Ssel0
  179. #define RTE_SPI5_DMA_TX_CH 11
  180. #define RTE_SPI5_DMA_TX_DMA_BASE DMA0
  181. #define RTE_SPI5_DMA_RX_CH 10
  182. #define RTE_SPI5_DMA_RX_DMA_BASE DMA0
  183. #define RTE_SPI6_SSEL_NUM kSPI_Ssel0
  184. #define RTE_SPI6_DMA_TX_CH 13
  185. #define RTE_SPI6_DMA_TX_DMA_BASE DMA0
  186. #define RTE_SPI6_DMA_RX_CH 12
  187. #define RTE_SPI6_DMA_RX_DMA_BASE DMA0
  188. #define RTE_SPI7_SSEL_NUM kSPI_Ssel0
  189. #define RTE_SPI7_DMA_TX_CH 15
  190. #define RTE_SPI7_DMA_TX_DMA_BASE DMA0
  191. #define RTE_SPI7_DMA_RX_CH 14
  192. #define RTE_SPI7_DMA_RX_DMA_BASE DMA0
  193. #endif /* __RTE_DEVICE_H */