diff options
| author | ZhangJing <[email protected]> | 2025-05-30 13:32:58 +0800 |
|---|---|---|
| committer | Rbb666 <[email protected]> | 2025-05-30 14:06:33 +0800 |
| commit | 97893c004c65760c638fd7eb571a08fc987a55e5 (patch) | |
| tree | 71c7c743e10a1281a104bfac56307e3d338a9818 /bsp/ultrarisc/arch/ur-cp100/interrupt.h | |
| parent | 93cc80e461d1e6d81e84c16caee4358f229e80f3 (diff) | |
[bsp]增加超睿DP1000 bsp支持v5.2.1
Diffstat (limited to 'bsp/ultrarisc/arch/ur-cp100/interrupt.h')
| -rw-r--r-- | bsp/ultrarisc/arch/ur-cp100/interrupt.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/bsp/ultrarisc/arch/ur-cp100/interrupt.h b/bsp/ultrarisc/arch/ur-cp100/interrupt.h new file mode 100644 index 0000000000..cda387087a --- /dev/null +++ b/bsp/ultrarisc/arch/ur-cp100/interrupt.h @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2006-2025 RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2021-05-20 bigmagic The first version + */ + +#ifndef INTERRUPT_H__ +#define INTERRUPT_H__ + +#define MAX_HANDLERS 128 + +#include <rthw.h> +#include "stack.h" + +enum +{ + EP_INSTRUCTION_ADDRESS_MISALIGNED = 0, + EP_INSTRUCTION_ACCESS_FAULT, + EP_ILLEGAL_INSTRUCTION, + EP_BREAKPOINT, + EP_LOAD_ADDRESS_MISALIGNED, + EP_LOAD_ACCESS_FAULT, + EP_STORE_ADDRESS_MISALIGNED, + EP_STORE_ACCESS_FAULT, + EP_ENVIRONMENT_CALL_U_MODE, + EP_ENVIRONMENT_CALL_S_MODE, + EP_RESERVED10, + EP_ENVIRONMENT_CALL_M_MODE, + EP_INSTRUCTION_PAGE_FAULT, /* page attr */ + EP_LOAD_PAGE_FAULT, /* read data */ + EP_RESERVED14, + EP_STORE_PAGE_FAULT, /* write data */ +}; + +int rt_hw_plic_irq_enable(int irq_number); +int rt_hw_plic_irq_disable(int irq_number); +void rt_hw_interrupt_init(void); +void rt_hw_interrupt_mask(int vector); +rt_isr_handler_t rt_hw_interrupt_install(int vector, rt_isr_handler_t handler, void *param, const char *name); +void handle_trap(rt_size_t xcause, rt_size_t xtval, rt_size_t xepc, struct rt_hw_stack_frame *sp); + +#endif
\ No newline at end of file |
