gd32f3x0_it.c 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. /*!
  2. \file gd32f3x0_it.c
  3. \brief interrupt service routines
  4. */
  5. /*
  6. Copyright (C) 2017 GigaDevice
  7. 2017-06-06, V1.0.0, firmware for GD32F3x0
  8. */
  9. #include "gd32f3x0_it.h"
  10. #include "systick.h"
  11. #include "main.h"
  12. /*!
  13. \brief this function handles NMI exception
  14. \param[in] none
  15. \param[out] none
  16. \retval none
  17. */
  18. void NMI_Handler(void)
  19. {
  20. }
  21. /*!
  22. \brief this function handles HardFault exception
  23. \param[in] none
  24. \param[out] none
  25. \retval none
  26. */
  27. void HardFault_Handler(void)
  28. {
  29. /* if Hard Fault exception occurs, go to infinite loop */
  30. while (1);
  31. }
  32. /*!
  33. \brief this function handles MemManage exception
  34. \param[in] none
  35. \param[out] none
  36. \retval none
  37. */
  38. void MemManage_Handler(void)
  39. {
  40. /* if Memory Manage exception occurs, go to infinite loop */
  41. while (1);
  42. }
  43. /*!
  44. \brief this function handles BusFault exception
  45. \param[in] none
  46. \param[out] none
  47. \retval none
  48. */
  49. void BusFault_Handler(void)
  50. {
  51. /* if Bus Fault exception occurs, go to infinite loop */
  52. while (1);
  53. }
  54. /*!
  55. \brief this function handles UsageFault exception
  56. \param[in] none
  57. \param[out] none
  58. \retval none
  59. */
  60. void UsageFault_Handler(void)
  61. {
  62. /* if Usage Fault exception occurs, go to infinite loop */
  63. while (1);
  64. }
  65. /*!
  66. \brief this function handles SVC exception
  67. \param[in] none
  68. \param[out] none
  69. \retval none
  70. */
  71. void SVC_Handler(void)
  72. {
  73. }
  74. /*!
  75. \brief this function handles DebugMon exception
  76. \param[in] none
  77. \param[out] none
  78. \retval none
  79. */
  80. void DebugMon_Handler(void)
  81. {
  82. }
  83. /*!
  84. \brief this function handles PendSV exception
  85. \param[in] none
  86. \param[out] none
  87. \retval none
  88. */
  89. void PendSV_Handler(void)
  90. {
  91. }
  92. /*!
  93. \brief this function handles SysTick exception
  94. \param[in] none
  95. \param[out] none
  96. \retval none
  97. */
  98. void SysTick_Handler(void)
  99. {
  100. led_spark();
  101. }
  102. /*!
  103. \brief this function handles EXTI10_15 exception
  104. \param[in] none
  105. \param[out] none
  106. \retval none
  107. */
  108. void EXTI4_15_IRQHandler(void)
  109. {
  110. if(SET == exti_interrupt_flag_get(EXTI_13)){
  111. exti_interrupt_flag_clear(EXTI_13);
  112. }
  113. }