Loading...
Searching...
No Matches
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
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
27typedef void (*plic_isr_cb_t)(int irq);
28
32void plic_init(void);
33
39void plic_disable_interrupt(unsigned irq);
40
46void plic_enable_interrupt(unsigned irq);
47
54void plic_set_priority(unsigned irq, unsigned priority);
55
62void plic_set_isr_cb(unsigned irq, plic_isr_cb_t cb);
63
67
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.