plic.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2020 Koen Zandberg <koen@bergzand.net>
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
20 #ifndef PLIC_H
21 #define PLIC_H
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
32 typedef void (*plic_isr_cb_t)(int irq);
33 
37 void plic_init(void);
38 
44 void plic_disable_interrupt(unsigned irq);
45 
51 void plic_enable_interrupt(unsigned irq);
52 
59 void plic_set_priority(unsigned irq, unsigned priority);
60 
67 void plic_set_isr_cb(unsigned irq, plic_isr_cb_t cb);
68 
79 void plic_isr_handler(void);
80 
81 #ifdef __cplusplus
82 }
83 #endif
84 
85 #endif /* PLIC_H */
86 
plic_enable_interrupt
void plic_enable_interrupt(unsigned irq)
Enable an interrupt on the PLIC.
plic_init
void plic_init(void)
Initialize the Platform-level interrupt controller.
plic_isr_handler
void plic_isr_handler(void)
External ISR callback.
plic_isr_cb_t
void(* plic_isr_cb_t)(int irq)
PLIC callback declaration.
Definition: plic.h:32
plic_set_isr_cb
void plic_set_isr_cb(unsigned irq, plic_isr_cb_t cb)
Set the interrupt callback.
plic_disable_interrupt
void plic_disable_interrupt(unsigned irq)
Disable an interrupt on the PLIC.
plic_set_priority
void plic_set_priority(unsigned irq, unsigned priority)
Set an interrupt priority.