stm32l0xx_it.c 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. /**
  2. ******************************************************************************
  3. * @file Templates/Src/stm32l0xx_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. * Copyright (c) 2016 STMicroelectronics.
  12. * All rights reserved.
  13. *
  14. * This software is licensed under terms that can be found in the LICENSE file
  15. * in the root directory of this software component.
  16. * If no LICENSE file comes with this software, it is provided AS-IS.
  17. *
  18. ******************************************************************************
  19. */
  20. /* Includes ------------------------------------------------------------------*/
  21. #include "stm32l0xx_it.h"
  22. #include "main.h"
  23. /** @addtogroup STM32L0xx_HAL_Examples
  24. * @{
  25. */
  26. /** @addtogroup Templates
  27. * @{
  28. */
  29. /* Private typedef -----------------------------------------------------------*/
  30. /* Private define ------------------------------------------------------------*/
  31. /* Private macro -------------------------------------------------------------*/
  32. /* Private variables ---------------------------------------------------------*/
  33. /* Private function prototypes -----------------------------------------------*/
  34. /* Private functions ---------------------------------------------------------*/
  35. /******************************************************************************/
  36. /* Cortex-M0+ Processor Exceptions Handlers */
  37. /******************************************************************************/
  38. /**
  39. * @brief This function handles NMI exception.
  40. * @param None
  41. * @retval None
  42. */
  43. void NMI_Handler(void)
  44. {
  45. }
  46. /**
  47. * @brief This function handles Hard Fault exception.
  48. * @param None
  49. * @retval None
  50. */
  51. void HardFault_Handler(void)
  52. {
  53. /* Go to infinite loop when Hard Fault exception occurs */
  54. BSP_LED_On(LED2);
  55. while (1)
  56. {
  57. }
  58. }
  59. /**
  60. * @brief This function handles SVCall exception.
  61. * @param None
  62. * @retval None
  63. */
  64. void SVC_Handler(void)
  65. {
  66. }
  67. /**
  68. * @brief This function handles PendSVC exception.
  69. * @param None
  70. * @retval None
  71. */
  72. void PendSV_Handler(void)
  73. {
  74. }
  75. /**
  76. * @brief This function handles SysTick Handler.
  77. * @param None
  78. * @retval None
  79. */
  80. void SysTick_Handler(void)
  81. {
  82. HAL_IncTick();
  83. }
  84. extern "C" {
  85. void EXTI4_15_IRQHandler(void)
  86. {
  87. HAL_GPIO_EXTI_IRQHandler(KEY_BUTTON_PIN);
  88. }
  89. }
  90. /******************************************************************************/
  91. /* STM32L0xx Peripherals Interrupt Handlers */
  92. /* Add here the Interrupt Handler for the used peripheral(s) (PPP), for the */
  93. /* available peripheral interrupt handler's name please refer to the startup */
  94. /* file (startup_stm32l0xx.s). */
  95. /******************************************************************************/
  96. /**
  97. * @brief This function handles PPP interrupt request.
  98. * @param None
  99. * @retval None
  100. */
  101. /*void PPP_IRQHandler(void)
  102. {
  103. }*/
  104. /**
  105. * @}
  106. */
  107. /**
  108. * @}
  109. */