gd32f30x_it.c 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. /*!
  2. \file gd32f30x_it.c
  3. \brief interrupt service routines
  4. \version 2022-05-30, V1.0.0, firmware for GD32F30x
  5. */
  6. /*
  7. Copyright (c) 2022, GigaDevice Semiconductor Inc.
  8. Redistribution and use in source and binary forms, with or without modification,
  9. are permitted provided that the following conditions are met:
  10. 1. Redistributions of source code must retain the above copyright notice, this
  11. list of conditions and the following disclaimer.
  12. 2. Redistributions in binary form must reproduce the above copyright notice,
  13. this list of conditions and the following disclaimer in the documentation
  14. and/or other materials provided with the distribution.
  15. 3. Neither the name of the copyright holder nor the names of its contributors
  16. may be used to endorse or promote products derived from this software without
  17. specific prior written permission.
  18. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  19. AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  20. WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  21. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
  22. INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  23. NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  24. PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  25. WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  26. ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
  27. OF SUCH DAMAGE.
  28. */
  29. #include "gd32f30x_it.h"
  30. #include "systick.h"
  31. /*!
  32. \brief this function handles NMI exception
  33. \param[in] none
  34. \param[out] none
  35. \retval none
  36. */
  37. void NMI_Handler(void)
  38. {
  39. }
  40. /*!
  41. \brief this function handles HardFault exception
  42. \param[in] none
  43. \param[out] none
  44. \retval none
  45. */
  46. void HardFault_Handler(void)
  47. {
  48. /* if Hard Fault exception occurs, go to infinite loop */
  49. while(1) {
  50. }
  51. }
  52. /*!
  53. \brief this function handles MemManage exception
  54. \param[in] none
  55. \param[out] none
  56. \retval none
  57. */
  58. void MemManage_Handler(void)
  59. {
  60. /* if Memory Manage exception occurs, go to infinite loop */
  61. while(1) {
  62. }
  63. }
  64. /*!
  65. \brief this function handles BusFault exception
  66. \param[in] none
  67. \param[out] none
  68. \retval none
  69. */
  70. void BusFault_Handler(void)
  71. {
  72. /* if Bus Fault exception occurs, go to infinite loop */
  73. while(1) {
  74. }
  75. }
  76. /*!
  77. \brief this function handles UsageFault exception
  78. \param[in] none
  79. \param[out] none
  80. \retval none
  81. */
  82. void UsageFault_Handler(void)
  83. {
  84. /* if Usage Fault exception occurs, go to infinite loop */
  85. while(1) {
  86. }
  87. }
  88. /*!
  89. \brief this function handles SVC exception
  90. \param[in] none
  91. \param[out] none
  92. \retval none
  93. */
  94. void SVC_Handler(void)
  95. {
  96. }
  97. /*!
  98. \brief this function handles DebugMon exception
  99. \param[in] none
  100. \param[out] none
  101. \retval none
  102. */
  103. void DebugMon_Handler(void)
  104. {
  105. }
  106. /*!
  107. \brief this function handles PendSV exception
  108. \param[in] none
  109. \param[out] none
  110. \retval none
  111. */
  112. void PendSV_Handler(void)
  113. {
  114. }
  115. /*!
  116. \brief this function handles SysTick exception
  117. \param[in] none
  118. \param[out] none
  119. \retval none
  120. */
  121. void SysTick_Handler(void)
  122. {
  123. delay_decrement();
  124. }