2020-10-16 11:38:52 +08:00
|
|
|
/*
|
2020-10-21 15:08:13 +08:00
|
|
|
* Copyright (c) 2020, Shenzhen Academy of Aerospace Technology
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*
|
|
|
|
* Change Logs:
|
|
|
|
* Date Author Notes
|
|
|
|
* 2020-10-16 Dystopia the first version
|
|
|
|
*/
|
2020-10-16 11:38:52 +08:00
|
|
|
|
|
|
|
#include <rtthread.h>
|
|
|
|
#include <rthw.h>
|
|
|
|
|
|
|
|
extern struct rt_irq_desc isr_table[];
|
|
|
|
|
|
|
|
void rt_hw_trap(int tt, unsigned int *sp)
|
|
|
|
{
|
2020-10-20 17:28:59 +08:00
|
|
|
void *param;
|
|
|
|
rt_isr_handler_t isr_func;
|
|
|
|
|
|
|
|
/* get interrupt service routine */
|
|
|
|
isr_func = isr_table[tt].handler;
|
|
|
|
param = isr_table[tt].param;
|
|
|
|
|
|
|
|
/* turn to interrupt service routine */
|
2020-10-16 11:38:52 +08:00
|
|
|
if (isr_func != RT_NULL)
|
|
|
|
isr_func(tt, param);
|
|
|
|
}
|