gd32f3x0_it.c 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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 "gd32f3x0_eval.h"
  11. /*!
  12. \brief this function handles NMI exception
  13. \param[in] none
  14. \param[out] none
  15. \retval none
  16. */
  17. void NMI_Handler(void)
  18. {
  19. }
  20. /*!
  21. \brief this function handles HardFault exception
  22. \param[in] none
  23. \param[out] none
  24. \retval none
  25. */
  26. void HardFault_Handler(void)
  27. {
  28. /* if Hard Fault exception occurs, go to infinite loop */
  29. while (1);
  30. }
  31. /*!
  32. \brief this function handles MemManage exception
  33. \param[in] none
  34. \param[out] none
  35. \retval none
  36. */
  37. void MemManage_Handler(void)
  38. {
  39. /* if Memory Manage exception occurs, go to infinite loop */
  40. while (1);
  41. }
  42. /*!
  43. \brief this function handles BusFault exception
  44. \param[in] none
  45. \param[out] none
  46. \retval none
  47. */
  48. void BusFault_Handler(void)
  49. {
  50. /* if Bus Fault exception occurs, go to infinite loop */
  51. while (1);
  52. }
  53. /*!
  54. \brief this function handles UsageFault exception
  55. \param[in] none
  56. \param[out] none
  57. \retval none
  58. */
  59. void UsageFault_Handler(void)
  60. {
  61. /* if Usage Fault exception occurs, go to infinite loop */
  62. while (1);
  63. }
  64. /*!
  65. \brief this function handles SVC exception
  66. \param[in] none
  67. \param[out] none
  68. \retval none
  69. */
  70. void SVC_Handler(void)
  71. {
  72. }
  73. /*!
  74. \brief this function handles DebugMon exception
  75. \param[in] none
  76. \param[out] none
  77. \retval none
  78. */
  79. void DebugMon_Handler(void)
  80. {
  81. }
  82. /*!
  83. \brief this function handles PendSV exception
  84. \param[in] none
  85. \param[out] none
  86. \retval none
  87. */
  88. void PendSV_Handler(void)
  89. {
  90. }
  91. /*!
  92. \brief this function handles SysTick exception
  93. \param[in] none
  94. \param[out] none
  95. \retval none
  96. */
  97. void SysTick_Handler(void)
  98. {
  99. }
  100. /*!
  101. \brief this function handles timer1 handle exception
  102. \param[in] none
  103. \param[out] none
  104. \retval none
  105. */
  106. void TIMER1_IRQHandler(void)
  107. {
  108. if(SET == timer_interrupt_flag_get(TIMER1, TIMER_INT_CH3)){
  109. gd_eval_led_on(LED3);
  110. timer_interrupt_flag_clear(TIMER1, TIMER_INT_CH3);
  111. }
  112. }