Flexio_Uart_Ip_Irq.c 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. /*==================================================================================================
  2. * Project : RTD AUTOSAR 4.4
  3. * Platform : CORTEXM
  4. * Peripheral : FLEXIO
  5. * Dependencies :
  6. *
  7. * Autosar Version : 4.4.0
  8. * Autosar Revision : ASR_REL_4_4_REV_0000
  9. * Autosar Conf.Variant :
  10. * SW Version : 1.0.0
  11. * Build Version : S32K1_RTD_1_0_0_HF01_D2109_ASR_REL_4_4_REV_0000_20210907
  12. *
  13. * (c) Copyright 2020-2021 NXP Semiconductors
  14. * All Rights Reserved.
  15. *
  16. * NXP Confidential. This software is owned or controlled by NXP and may only be
  17. * used strictly in accordance with the applicable license terms. By expressly
  18. * accepting such terms or by downloading, installing, activating and/or otherwise
  19. * using the software, you are agreeing that you have read, and that you agree to
  20. * comply with and are bound by, such license terms. If you do not agree to be
  21. * bound by the applicable license terms, then you may not retain, install,
  22. * activate or otherwise use the software.
  23. ==================================================================================================*/
  24. /**
  25. * @file
  26. * @defgroup flexio_uart_ip Flexio UART IPL
  27. * @addtogroup flexio_uart_ip Flexio UART IPL
  28. * @{
  29. */
  30. #ifdef __cplusplus
  31. extern "C"{
  32. #endif
  33. /*==================================================================================================
  34. * INCLUDE FILES
  35. * 1) system and project includes
  36. * 2) needed interfaces from external units
  37. * 3) internal and external interfaces from this unit
  38. ==================================================================================================*/
  39. #include "Flexio_Uart_Ip.h"
  40. #include "Flexio_Uart_Ip_Irq.h"
  41. /*==================================================================================================
  42. * SOURCE FILE VERSION INFORMATION
  43. ==================================================================================================*/
  44. #define FLEXIO_UART_IP_IRQ_VENDOR_ID_C 43
  45. #define FLEXIO_UART_IP_IRQ_AR_RELEASE_MAJOR_VERSION_C 4
  46. #define FLEXIO_UART_IP_IRQ_AR_RELEASE_MINOR_VERSION_C 4
  47. #define FLEXIO_UART_IP_IRQ_AR_RELEASE_REVISION_VERSION_C 0
  48. #define FLEXIO_UART_IP_IRQ_SW_MAJOR_VERSION_C 1
  49. #define FLEXIO_UART_IP_IRQ_SW_MINOR_VERSION_C 0
  50. #define FLEXIO_UART_IP_IRQ_SW_PATCH_VERSION_C 0
  51. /*==================================================================================================
  52. * FILE VERSION CHECKS
  53. ==================================================================================================*/
  54. /* Checks against Flexio_Uart_Ip.h */
  55. #if (FLEXIO_UART_IP_IRQ_VENDOR_ID_C != FLEXIO_UART_IP_VENDOR_ID)
  56. #error "Flexio_Uart_Ip_Irq.c and Flexio_Uart_Ip.h have different vendor ids"
  57. #endif
  58. #if ((FLEXIO_UART_IP_IRQ_AR_RELEASE_MAJOR_VERSION_C != FLEXIO_UART_IP_AR_RELEASE_MAJOR_VERSION) || \
  59. (FLEXIO_UART_IP_IRQ_AR_RELEASE_MINOR_VERSION_C != FLEXIO_UART_IP_AR_RELEASE_MINOR_VERSION) || \
  60. (FLEXIO_UART_IP_IRQ_AR_RELEASE_REVISION_VERSION_C != FLEXIO_UART_IP_AR_RELEASE_REVISION_VERSION))
  61. #error "AUTOSAR Version Numbers of Flexio_Uart_Ip_Irq.c and Flexio_Uart_Ip.h are different"
  62. #endif
  63. #if ((FLEXIO_UART_IP_IRQ_SW_MAJOR_VERSION_C != FLEXIO_UART_IP_SW_MAJOR_VERSION) || \
  64. (FLEXIO_UART_IP_IRQ_SW_MINOR_VERSION_C != FLEXIO_UART_IP_SW_MINOR_VERSION) || \
  65. (FLEXIO_UART_IP_IRQ_SW_PATCH_VERSION_C != FLEXIO_UART_IP_SW_PATCH_VERSION))
  66. #error "Software Version Numbers of Flexio_Uart_Ip_Irq.c and Flexio_Uart_Ip.h are different"
  67. #endif
  68. /* Checks against Flexio_Uart_Ip_Irq.h */
  69. #if (FLEXIO_UART_IP_IRQ_VENDOR_ID_C != FLEXIO_UART_IP_IRQ_VENDOR_ID)
  70. #error "Flexio_Uart_Ip_Irq.c and Flexio_Uart_Ip_Irq.h have different vendor ids"
  71. #endif
  72. #if ((FLEXIO_UART_IP_IRQ_AR_RELEASE_MAJOR_VERSION_C != FLEXIO_UART_IP_IRQ_AR_RELEASE_MAJOR_VERSION) || \
  73. (FLEXIO_UART_IP_IRQ_AR_RELEASE_MINOR_VERSION_C != FLEXIO_UART_IP_IRQ_AR_RELEASE_MINOR_VERSION) || \
  74. (FLEXIO_UART_IP_IRQ_AR_RELEASE_REVISION_VERSION_C != FLEXIO_UART_IP_IRQ_AR_RELEASE_REVISION_VERSION))
  75. #error "AUTOSAR Version Numbers of Flexio_Uart_Ip_Irq.c and Flexio_Uart_Ip_Irq.h are different"
  76. #endif
  77. #if ((FLEXIO_UART_IP_IRQ_SW_MAJOR_VERSION_C != FLEXIO_UART_IP_IRQ_SW_MAJOR_VERSION) || \
  78. (FLEXIO_UART_IP_IRQ_SW_MINOR_VERSION_C != FLEXIO_UART_IP_IRQ_SW_MINOR_VERSION) || \
  79. (FLEXIO_UART_IP_IRQ_SW_PATCH_VERSION_C != FLEXIO_UART_IP_IRQ_SW_PATCH_VERSION))
  80. #error "Software Version Numbers of Flexio_Uart_Ip_Irq.c and Flexio_Uart_Ip_Irq.h are different"
  81. #endif
  82. /*==================================================================================================
  83. * CONSTANTS
  84. ==================================================================================================*/
  85. /*==================================================================================================
  86. * DEFINES AND MACROS
  87. ==================================================================================================*/
  88. /*==================================================================================================
  89. * STRUCTURES AND OTHER TYPEDEFS
  90. ==================================================================================================*/
  91. /*==================================================================================================
  92. * GLOBAL VARIABLE DECLARATIONS
  93. ==================================================================================================*/
  94. /*==================================================================================================
  95. * FUNCTION PROTOTYPES
  96. ==================================================================================================*/
  97. #ifdef FLEXIO_UART_IP_IS_USING
  98. #if (FLEXIO_UART_IP_IS_USING == STD_ON)
  99. #define UART_START_SEC_CODE
  100. #include "Uart_MemMap.h"
  101. #if (FLEXIO_UART_IP_HAS_DMA_ENABLED == STD_ON)
  102. #if (FLEXIO_UART_IP_NUMBER_OF_SHIFTER_AND_TIMER > 0U)
  103. void Flexio_0_Uart_Ip_DmaRxCompleteCallback(void)
  104. {
  105. Flexio_Uart_Ip_CompleteReceiveUsingDma(0);
  106. }
  107. void Flexio_0_Uart_Ip_DmaTxCompleteCallback(void)
  108. {
  109. Flexio_Uart_Ip_CompleteSendUsingDma(0);
  110. }
  111. #endif
  112. #if (FLEXIO_UART_IP_NUMBER_OF_SHIFTER_AND_TIMER > 1U)
  113. void Flexio_1_Uart_Ip_DmaRxCompleteCallback(void)
  114. {
  115. Flexio_Uart_Ip_CompleteReceiveUsingDma(1);
  116. }
  117. void Flexio_1_Uart_Ip_DmaTxCompleteCallback(void)
  118. {
  119. Flexio_Uart_Ip_CompleteSendUsingDma(1);
  120. }
  121. #endif
  122. #if (FLEXIO_UART_IP_NUMBER_OF_SHIFTER_AND_TIMER > 2U)
  123. void Flexio_2_Uart_Ip_DmaRxCompleteCallback(void)
  124. {
  125. Flexio_Uart_Ip_CompleteReceiveUsingDma(2);
  126. }
  127. void Flexio_2_Uart_Ip_DmaTxCompleteCallback(void)
  128. {
  129. Flexio_Uart_Ip_CompleteSendUsingDma(2);
  130. }
  131. #endif
  132. #if (FLEXIO_UART_IP_NUMBER_OF_SHIFTER_AND_TIMER > 3U)
  133. void Flexio_3_Uart_Ip_DmaRxCompleteCallback(void)
  134. {
  135. Flexio_Uart_Ip_CompleteReceiveUsingDma(3);
  136. }
  137. void Flexio_3_Uart_Ip_DmaTxCompleteCallback(void)
  138. {
  139. Flexio_Uart_Ip_CompleteSendUsingDma(3);
  140. }
  141. #endif
  142. #if (FLEXIO_UART_IP_NUMBER_OF_SHIFTER_AND_TIMER > 4U)
  143. void Flexio_4_Uart_Ip_DmaRxCompleteCallback(void)
  144. {
  145. Flexio_Uart_Ip_CompleteReceiveUsingDma(4);
  146. }
  147. void Flexio_4_Uart_Ip_DmaTxCompleteCallback(void)
  148. {
  149. Flexio_Uart_Ip_CompleteSendUsingDma(4);
  150. }
  151. #endif
  152. #if (FLEXIO_UART_IP_NUMBER_OF_SHIFTER_AND_TIMER > 5U)
  153. void Flexio_5_Uart_Ip_DmaRxCompleteCallback(void)
  154. {
  155. Flexio_Uart_Ip_CompleteReceiveUsingDma(5);
  156. }
  157. void Flexio_5_Uart_Ip_DmaTxCompleteCallback(void)
  158. {
  159. Flexio_Uart_Ip_CompleteSendUsingDma(5);
  160. }
  161. #endif
  162. #if (FLEXIO_UART_IP_NUMBER_OF_SHIFTER_AND_TIMER > 6U)
  163. void Flexio_6_Uart_Ip_DmaRxCompleteCallback(void)
  164. {
  165. Flexio_Uart_Ip_CompleteReceiveUsingDma(6);
  166. }
  167. void Flexio_6_Uart_Ip_DmaTxCompleteCallback(void)
  168. {
  169. Flexio_Uart_Ip_CompleteSendUsingDma(6);
  170. }
  171. #endif
  172. #if (FLEXIO_UART_IP_NUMBER_OF_SHIFTER_AND_TIMER > 7U)
  173. void Flexio_7_Uart_Ip_DmaRxCompleteCallback(void)
  174. {
  175. Flexio_Uart_Ip_CompleteReceiveUsingDma(7);
  176. }
  177. void Flexio_7_Uart_Ip_DmaTxCompleteCallback(void)
  178. {
  179. Flexio_Uart_Ip_CompleteSendUsingDma(7);
  180. }
  181. #endif
  182. #endif /*(FLEXIO_UART_IP_HAS_DMA_ENABLED == STD_ON)*/
  183. #define UART_STOP_SEC_CODE
  184. #include "Uart_MemMap.h"
  185. #endif /* (FLEXIO_UART_IP_IS_USING == STD_ON) */
  186. #endif /* #ifdef FLEXIO_UART_IP_IS_USING */
  187. #ifdef __cplusplus
  188. }
  189. /** @} */
  190. #endif