RTE_Device.h 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. /*
  2. * Copyright (c) 2016, Freescale Semiconductor, Inc.
  3. * Copyright 2016-2020 NXP
  4. * All rights reserved.
  5. *
  6. *
  7. * SPDX-License-Identifier: BSD-3-Clause
  8. */
  9. #ifndef _RTE_DEVICE_H
  10. #define _RTE_DEVICE_H
  11. #include "pin_mux.h"
  12. /* UART Select, UART0 - UART5. */
  13. /* User needs to provide the implementation of LPUARTX_GetFreq/LPUARTX_InitPins/LPUARTX_DeinitPins for the enabled
  14. * LPUART instance. */
  15. #define RTE_USART1 1
  16. #define RTE_USART1_DMA_EN 1
  17. #define RTE_USART2 0
  18. #define RTE_USART2_DMA_EN 0
  19. #define RTE_USART3 0
  20. #define RTE_USART3_DMA_EN 0
  21. #define RTE_USART4 0
  22. #define RTE_USART4_DMA_EN 0
  23. #define RTE_USART5 0
  24. #define RTE_USART5_DMA_EN 0
  25. #define RTE_USART6 0
  26. #define RTE_USART6_DMA_EN 0
  27. #define RTE_USART7 0
  28. #define RTE_USART7_DMA_EN 0
  29. #define RTE_USART8 0
  30. #define RTE_USART8_DMA_EN 0
  31. /* UART configuration. */
  32. #define RTE_USART1_PIN_INIT LPUART1_InitPins
  33. #define RTE_USART1_PIN_DEINIT LPUART1_DeinitPins
  34. #define RTE_USART1_DMA_TX_CH 0
  35. #define RTE_USART1_DMA_TX_PERI_SEL (uint8_t) kDmaRequestMuxLPUART1Tx
  36. #define RTE_USART1_DMA_TX_DMAMUX_BASE DMAMUX
  37. #define RTE_USART1_DMA_TX_DMA_BASE DMA0
  38. #define RTE_USART1_DMA_RX_CH 1
  39. #define RTE_USART1_DMA_RX_PERI_SEL (uint8_t) kDmaRequestMuxLPUART1Rx
  40. #define RTE_USART1_DMA_RX_DMAMUX_BASE DMAMUX
  41. #define RTE_USART1_DMA_RX_DMA_BASE DMA0
  42. #define RTE_USART2_PIN_INIT LPUART2_InitPins
  43. #define RTE_USART2_PIN_DEINIT LPUART2_DeinitPins
  44. #define RTE_USART2_DMA_TX_CH 2
  45. #define RTE_USART2_DMA_TX_PERI_SEL (uint8_t) kDmaRequestMuxLPUART2Tx
  46. #define RTE_USART2_DMA_TX_DMAMUX_BASE DMAMUX
  47. #define RTE_USART2_DMA_TX_DMA_BASE DMA0
  48. #define RTE_USART2_DMA_RX_CH 3
  49. #define RTE_USART2_DMA_RX_PERI_SEL (uint8_t) kDmaRequestMuxLPUART2Rx
  50. #define RTE_USART2_DMA_RX_DMAMUX_BASE DMAMUX
  51. #define RTE_USART2_DMA_RX_DMA_BASE DMA0
  52. #define RTE_USART3_PIN_INIT LPUART3_InitPins
  53. #define RTE_USART3_PIN_DEINIT LPUART3_DeinitPins
  54. #define RTE_USART3_DMA_TX_CH 4
  55. #define RTE_USART3_DMA_TX_PERI_SEL (uint8_t) kDmaRequestMuxLPUART3Tx
  56. #define RTE_USART3_DMA_TX_DMAMUX_BASE DMAMUX
  57. #define RTE_USART3_DMA_TX_DMA_BASE DMA0
  58. #define RTE_USART3_DMA_RX_CH 5
  59. #define RTE_USART3_DMA_RX_PERI_SEL (uint8_t) kDmaRequestMuxLPUART3Rx
  60. #define RTE_USART3_DMA_RX_DMAMUX_BASE DMAMUX
  61. #define RTE_USART3_DMA_RX_DMA_BASE DMA0
  62. #define RTE_USART4_PIN_INIT LPUART4_InitPins
  63. #define RTE_USART4_PIN_DEINIT LPUART4_DeinitPins
  64. #define RTE_USART4_DMA_TX_CH 6
  65. #define RTE_USART4_DMA_TX_PERI_SEL (uint8_t) kDmaRequestMuxLPUART4Tx
  66. #define RTE_USART4_DMA_TX_DMAMUX_BASE DMAMUX
  67. #define RTE_USART4_DMA_TX_DMA_BASE DMA0
  68. #define RTE_USART4_DMA_RX_CH 7
  69. #define RTE_USART4_DMA_RX_PERI_SEL (uint8_t) kDmaRequestMuxLPUART4Rx
  70. #define RTE_USART4_DMA_RX_DMAMUX_BASE DMAMUX
  71. #define RTE_USART4_DMA_RX_DMA_BASE DMA0
  72. #define RTE_USART5_PIN_INIT LPUART5_InitPins
  73. #define RTE_USART5_PIN_DEINIT LPUART5_DeinitPins
  74. #define RTE_USART5_DMA_TX_CH 8
  75. #define RTE_USART5_DMA_TX_PERI_SEL (uint8_t) kDmaRequestMuxLPUART5Tx
  76. #define RTE_USART5_DMA_TX_DMAMUX_BASE DMAMUX
  77. #define RTE_USART5_DMA_TX_DMA_BASE DMA0
  78. #define RTE_USART5_DMA_RX_CH 9
  79. #define RTE_USART5_DMA_RX_PERI_SEL (uint8_t) kDmaRequestMuxLPUART5Rx
  80. #define RTE_USART5_DMA_RX_DMAMUX_BASE DMAMUX
  81. #define RTE_USART5_DMA_RX_DMA_BASE DMA0
  82. #define RTE_USART6_PIN_INIT LPUART6_InitPins
  83. #define RTE_USART6_PIN_DEINIT LPUART6_DeinitPins
  84. #define RTE_USART6_DMA_TX_CH 10
  85. #define RTE_USART6_DMA_TX_PERI_SEL (uint8_t) kDmaRequestMuxLPUART6Tx
  86. #define RTE_USART6_DMA_TX_DMAMUX_BASE DMAMUX
  87. #define RTE_USART6_DMA_TX_DMA_BASE DMA0
  88. #define RTE_USART6_DMA_RX_CH 11
  89. #define RTE_USART6_DMA_RX_PERI_SEL (uint8_t) kDmaRequestMuxLPUART6Rx
  90. #define RTE_USART6_DMA_RX_DMAMUX_BASE DMAMUX
  91. #define RTE_USART6_DMA_RX_DMA_BASE DMA0
  92. #define RTE_USART7_PIN_INIT LPUART7_InitPins
  93. #define RTE_USART7_PIN_DEINIT LPUART7_DeinitPins
  94. #define RTE_USART7_DMA_TX_CH 12
  95. #define RTE_USART7_DMA_TX_PERI_SEL (uint8_t) kDmaRequestMuxLPUART7Tx
  96. #define RTE_USART7_DMA_TX_DMAMUX_BASE DMAMUX
  97. #define RTE_USART7_DMA_TX_DMA_BASE DMA0
  98. #define RTE_USART7_DMA_RX_CH 13
  99. #define RTE_USART7_DMA_RX_PERI_SEL (uint8_t) kDmaRequestMuxLPUART7Rx
  100. #define RTE_USART7_DMA_RX_DMAMUX_BASE DMAMUX
  101. #define RTE_USART7_DMA_RX_DMA_BASE DMA0
  102. #define RTE_USART8_PIN_INIT LPUART8_InitPins
  103. #define RTE_USART8_PIN_DEINIT LPUART8_DeinitPins
  104. #define RTE_USART8_DMA_TX_CH 14
  105. #define RTE_USART8_DMA_TX_PERI_SEL (uint8_t) kDmaRequestMuxLPUART8Tx
  106. #define RTE_USART8_DMA_TX_DMAMUX_BASE DMAMUX
  107. #define RTE_USART8_DMA_TX_DMA_BASE DMA0
  108. #define RTE_USART8_DMA_RX_CH 15
  109. #define RTE_USART8_DMA_RX_PERI_SEL (uint8_t) kDmaRequestMuxLPUART8Rx
  110. #define RTE_USART8_DMA_RX_DMAMUX_BASE DMAMUX
  111. #define RTE_USART8_DMA_RX_DMA_BASE DMA0
  112. /* ENET configuration. */
  113. #define RTE_ENET 1
  114. #define RTE_ENET_PHY_ADDRESS 2
  115. #define RTE_ENET_MII 0
  116. #define RTE_ENET_RMII 1
  117. #endif /* _RTE_DEVICE_H */