ch32v20x_it.c 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /********************************** (C) COPYRIGHT *******************************
  2. * File Name : ch32v20x_it.c
  3. * Author : WCH
  4. * Version : V1.0.0
  5. * Date : 2022/06/16
  6. * Description : Main Interrupt Service Routines.
  7. *********************************************************************************
  8. * Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd.
  9. * Attention: This software (modified or not) and binary are used for
  10. * microcontroller manufactured by Nanjing Qinheng Microelectronics.
  11. *******************************************************************************/
  12. /*********************************************************************
  13. * INCLUDES
  14. */
  15. #include "ch32v20x_it.h"
  16. #include "CONFIG.h"
  17. /*********************************************************************
  18. * LOCAL FUNCTIONS
  19. */
  20. void NMI_Handler(void) __attribute__((interrupt("WCH-Interrupt-fast")));
  21. void HardFault_Handler(void) __attribute__((interrupt("WCH-Interrupt-fast")));
  22. void BB_IRQHandler(void) __attribute__((interrupt("WCH-Interrupt-fast")));
  23. //void LLE_IRQHandler(void) __attribute__((interrupt("WCH-Interrupt-fast")));
  24. /*********************************************************************
  25. * @fn NMI_Handler
  26. *
  27. * @brief This function handles NMI exception.
  28. *
  29. * @return None
  30. */
  31. void NMI_Handler(void)
  32. {
  33. }
  34. /*********************************************************************
  35. * @fn HardFault_Handler
  36. *
  37. * @brief This function handles Hard Fault exception.
  38. *
  39. * @return None
  40. */
  41. void HardFault_Handler(void)
  42. {
  43. NVIC_SystemReset();
  44. while(1)
  45. {
  46. }
  47. }
  48. /*********************************************************************
  49. * @fn BB_IRQHandler
  50. *
  51. * @brief BB Interrupt for BLE.
  52. *
  53. * @return None
  54. */
  55. void BB_IRQHandler(void)
  56. {
  57. BB_IRQLibHandler();
  58. }
  59. ///*********************************************************************
  60. // * @fn LLE_IRQHandler
  61. // *
  62. // * @brief LLE Interrupt for BLE.
  63. // *
  64. // * @return None
  65. // */
  66. //void LLE_IRQHandler(void)
  67. //{
  68. // LLE_IRQLibHandler();
  69. //}