Loading...
Searching...
No Matches
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
19#ifndef PLIC_H
20#define PLIC_H
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
31typedef void (*plic_isr_cb_t)(int irq);
32
36void plic_init(void);
37
43void plic_disable_interrupt(unsigned irq);
44
50void plic_enable_interrupt(unsigned irq);
51
58void plic_set_priority(unsigned irq, unsigned priority);
59
66void plic_set_isr_cb(unsigned irq, plic_isr_cb_t cb);
67
79
80#ifdef __cplusplus
81}
82#endif
83
84#endif /* PLIC_H */
void(* plic_isr_cb_t)(int irq)
PLIC callback declaration.
Definition plic.h:31
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.