summaryrefslogtreecommitdiff
path: root/code/fe310/eos/interrupt.c
diff options
context:
space:
mode:
Diffstat (limited to 'code/fe310/eos/interrupt.c')
-rw-r--r--code/fe310/eos/interrupt.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/code/fe310/eos/interrupt.c b/code/fe310/eos/interrupt.c
index 706d96b..0172fb8 100644
--- a/code/fe310/eos/interrupt.c
+++ b/code/fe310/eos/interrupt.c
@@ -56,6 +56,10 @@ void eos_intr_set(uint8_t int_num, uint8_t priority, eos_intr_fptr_t handler) {
PLIC_enable_interrupt(&plic, int_num);
}
+void eos_intr_set_handler(uint8_t int_num, eos_intr_fptr_t handler) {
+ ext_interrupt_handler[int_num] = handler;
+}
+
void eos_intr_set_priority(uint8_t int_num, uint8_t priority) {
PLIC_set_priority(&plic, int_num, priority);
}