123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- /********************************** (C) COPYRIGHT *******************************
- * File Name : ch32v10x_it.c
- * Author : WCH
- * Version : V1.0.0
- * Date : 2020/04/30
- * Description : Main Interrupt Service Routines.
- * Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd.
- * SPDX-License-Identifier: Apache-2.0
- *******************************************************************************/
- #include "ch32v10x_it.h"
- #include "board.h"
- #include <rtthread.h>
- void NMI_Handler(void) __attribute__((interrupt()));
- void HardFault_Handler(void) __attribute__((interrupt()));
- /*********************************************************************
- * @fn NMI_Handler
- *
- * @brief This function handles NMI exception.
- *
- * @return none
- */
- void NMI_Handler(void)
- {
- GET_INT_SP();
- rt_interrupt_enter();
- rt_kprintf(" NMI Handler\r\n");
- rt_interrupt_leave();
- FREE_INT_SP();
- }
- /*********************************************************************
- * @fn HardFault_Handler
- *
- * @brief This function handles Hard Fault exception.
- *
- * @return none
- */
- void HardFault_Handler(void)
- {
- GET_INT_SP();
- rt_interrupt_enter();
- rt_kprintf(" hardfult\r\n");
- rt_interrupt_leave();
- FREE_INT_SP();
- }
|