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 
9 #pragma once
10 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
30 typedef void (*plic_isr_cb_t)(int irq);
31 
35 void plic_init(void);
36 
42 void plic_disable_interrupt(unsigned irq);
43 
49 void plic_enable_interrupt(unsigned irq);
50 
57 void plic_set_priority(unsigned irq, unsigned priority);
58 
65 void plic_set_isr_cb(unsigned irq, plic_isr_cb_t cb);
66 
77 void plic_isr_handler(void);
78 
79 #ifdef __cplusplus
80 }
81 #endif
82 
void(* plic_isr_cb_t)(int irq)
PLIC callback declaration.
Definition: plic.h:30
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.