1 /*
2  * Copyright (c) 2022 Carlo Caione <ccaione@baylibre.com>
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 /**
8  * @file
9  * @brief Driver for Core-Local Interrupt Controller (CLIC)
10  */
11 
12 #ifndef ZEPHYR_INCLUDE_DRIVERS_RISCV_CLIC_H_
13 #define ZEPHYR_INCLUDE_DRIVERS_RISCV_CLIC_H_
14 
15 /**
16  * @brief Enable interrupt
17  *
18  * @param irq interrupt ID
19  */
20 void riscv_clic_irq_enable(uint32_t irq);
21 
22 /**
23  * @brief Disable interrupt
24  *
25  * @param irq interrupt ID
26  */
27 void riscv_clic_irq_disable(uint32_t irq);
28 
29 /**
30  * @brief Check if an interrupt is enabled
31  *
32  * @param irq interrupt ID
33  * @return Returns true if interrupt is enabled, false otherwise
34  */
35 int riscv_clic_irq_is_enabled(uint32_t irq);
36 
37 /**
38  * @brief Set interrupt priority
39  *
40  * @param irq interrupt ID
41  * @param prio interrupt priority
42  * @param flags interrupt flags
43  */
44 void riscv_clic_irq_priority_set(uint32_t irq, uint32_t prio, uint32_t flags);
45 
46 #endif /* ZEPHYR_INCLUDE_DRIVERS_RISCV_CLIC_H_ */
47