plic.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2020 Koen Zandberg <koen@bergzand.net>
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
27 typedef void (*plic_isr_cb_t)(int irq);
28 
32 void plic_init(void);
33 
39 void plic_disable_interrupt(unsigned irq);
40 
46 void plic_enable_interrupt(unsigned irq);
47 
54 void plic_set_priority(unsigned irq, unsigned priority);
55 
62 void plic_set_isr_cb(unsigned irq, plic_isr_cb_t cb);
63 
74 void plic_isr_handler(void);
75 
76 #ifdef __cplusplus
77 }
78 #endif
79 
void(* plic_isr_cb_t)(int irq)
PLIC callback declaration.
Definition: plic.h:27
void plic_isr_handler(void)
External ISR callback.
void plic_set_priority(unsigned irq, unsigned priority)
Set an interrupt priority.
void plic_disable_interrupt(unsigned irq)
Disable an interrupt on the PLIC.
void plic_enable_interrupt(unsigned irq)
Enable an interrupt on the PLIC.
void plic_init(void)
Initialize the Platform-level interrupt controller.
void plic_set_isr_cb(unsigned irq, plic_isr_cb_t cb)
Set the interrupt callback.