1 /* 2 * Copyright (c) 2020, Shenzhen Academy of Aerospace Technology 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 * 6 * Change Logs: 7 * Date Author Notes 8 * 2020-10-16 Dystopia the first version 9 */ 10 11 #include <rtthread.h> 12 #include <rthw.h> 13 14 extern struct rt_irq_desc isr_table[]; 15 rt_hw_trap(int tt,unsigned int * sp)16void rt_hw_trap(int tt, unsigned int *sp) 17 { 18 void *param; 19 rt_isr_handler_t isr_func; 20 21 /* get interrupt service routine */ 22 isr_func = isr_table[tt].handler; 23 param = isr_table[tt].param; 24 25 /* turn to interrupt service routine */ 26 if (isr_func != RT_NULL) 27 isr_func(tt, param); 28 } 29