/STM32Cube-1.10.1/Projects/STM32F0308-Discovery/Examples/UART/UART_TwoBoards_ComIT/Src/stm32f0xx_it.c

https://github.com/aegean-odyssey/mpmd_marlin_1.1.x · C · 159 lines · 30 code · 17 blank · 112 comment · 1 complexity · 5a774b78ca92f8f649dfca3d2b2566d3 MD5 · raw file

  1. /**
  2. ******************************************************************************
  3. * @file UART/UART_TwoBoards_ComIT/Src/stm32f0xx_it.c
  4. * @author MCD Application Team
  5. * @brief Main Interrupt Service Routines.
  6. * This file provides template for all exceptions handler and
  7. * peripherals interrupt service routine.
  8. ******************************************************************************
  9. * @attention
  10. *
  11. * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
  12. *
  13. * Redistribution and use in source and binary forms, with or without modification,
  14. * are permitted provided that the following conditions are met:
  15. * 1. Redistributions of source code must retain the above copyright notice,
  16. * this list of conditions and the following disclaimer.
  17. * 2. Redistributions in binary form must reproduce the above copyright notice,
  18. * this list of conditions and the following disclaimer in the documentation
  19. * and/or other materials provided with the distribution.
  20. * 3. Neither the name of STMicroelectronics nor the names of its contributors
  21. * may be used to endorse or promote products derived from this software
  22. * without specific prior written permission.
  23. *
  24. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  25. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  26. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  27. * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  28. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  29. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  30. * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  31. * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  32. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  33. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  34. *
  35. ******************************************************************************
  36. */
  37. /* Includes ------------------------------------------------------------------*/
  38. #include "main.h"
  39. #include "stm32f0xx_it.h"
  40. /** @addtogroup STM32F0xx_HAL_Examples
  41. * @{
  42. */
  43. /** @addtogroup UART_TwoBoards_ComIT
  44. * @{
  45. */
  46. /* Private typedef -----------------------------------------------------------*/
  47. /* Private define ------------------------------------------------------------*/
  48. /* Private macro -------------------------------------------------------------*/
  49. /* Private variables ---------------------------------------------------------*/
  50. /* UART handler declared in "main.c" file */
  51. extern UART_HandleTypeDef UartHandle;
  52. /* Private function prototypes -----------------------------------------------*/
  53. /* Private functions ---------------------------------------------------------*/
  54. /******************************************************************************/
  55. /* Cortex-M0 Processor Exceptions Handlers */
  56. /******************************************************************************/
  57. /**
  58. * @brief This function handles NMI exception.
  59. * @param None
  60. * @retval None
  61. */
  62. void NMI_Handler(void)
  63. {
  64. }
  65. /**
  66. * @brief This function handles Hard Fault exception.
  67. * @param None
  68. * @retval None
  69. */
  70. void HardFault_Handler(void)
  71. {
  72. /* Go to infinite loop when Hard Fault exception occurs */
  73. while (1)
  74. {
  75. }
  76. }
  77. /**
  78. * @brief This function handles SVCall exception.
  79. * @param None
  80. * @retval None
  81. */
  82. void SVC_Handler(void)
  83. {
  84. }
  85. /**
  86. * @brief This function handles PendSVC exception.
  87. * @param None
  88. * @retval None
  89. */
  90. void PendSV_Handler(void)
  91. {
  92. }
  93. /**
  94. * @brief This function handles SysTick Handler.
  95. * @param None
  96. * @retval None
  97. */
  98. void SysTick_Handler(void)
  99. {
  100. HAL_IncTick();
  101. }
  102. /******************************************************************************/
  103. /* STM32F0xx Peripherals Interrupt Handlers */
  104. /* Add here the Interrupt Handler for the used peripheral(s) (PPP), for the */
  105. /* available peripheral interrupt handler's name please refer to the startup */
  106. /* file (startup_stm32f0xx.s). */
  107. /******************************************************************************/
  108. /**
  109. * @brief This function handles UART interrupt request.
  110. * @param None
  111. * @retval None
  112. * @Note This function is redefined in "main.h" and related to DMA
  113. * used for USART data transmission
  114. */
  115. void USARTx_IRQHandler(void)
  116. {
  117. HAL_UART_IRQHandler(&UartHandle);
  118. }
  119. /**
  120. * @brief This function handles external line 0 interrupt request.
  121. * @param None
  122. * @retval None
  123. */
  124. void EXTI0_1_IRQHandler(void)
  125. {
  126. HAL_GPIO_EXTI_IRQHandler(USER_BUTTON_PIN);
  127. }
  128. /**
  129. * @brief This function handles PPP interrupt request.
  130. * @param None
  131. * @retval None
  132. */
  133. /*void PPP_IRQHandler(void)
  134. {
  135. }*/
  136. /**
  137. * @}
  138. */
  139. /**
  140. * @}
  141. */
  142. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/