1 /*
2  * Copyright (C) 2022-2024, Xiaohua Semiconductor Co., Ltd.
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Change Logs:
7  * Date           Author       Notes
8  * 2022-04-28     CDT          first version
9  */
10 
11 #ifndef __DRV_IRQ_H__
12 #define __DRV_IRQ_H__
13 
14 /*******************************************************************************
15  * Include files
16  ******************************************************************************/
17 #include <rtdef.h>
18 #include "hc32_ll.h"
19 
20 /* C binding of definitions if building with C++ compiler */
21 #ifdef __cplusplus
22 extern "C"
23 {
24 #endif
25 
26 /*******************************************************************************
27  * Global type definitions ('typedef')
28  ******************************************************************************/
29 struct hc32_irq_config
30 {
31     IRQn_Type       irq_num;
32     uint32_t        irq_prio;
33     en_int_src_t    int_src;
34 };
35 
36 /*******************************************************************************
37  * Global pre-processor symbols/macros ('#define')
38  ******************************************************************************/
39 
40 /*******************************************************************************
41  * Global variable definitions ('extern')
42  ******************************************************************************/
43 
44 /*******************************************************************************
45  * Global function prototypes (definition in C source)
46  ******************************************************************************/
47 rt_err_t hc32_install_irq_handler(struct hc32_irq_config *irq_config,
48                                   void (*irq_hdr)(void),
49                                   rt_bool_t irq_enable);
50 
51 #ifdef __cplusplus
52 }
53 #endif
54 
55 #endif /* __DRV_IRQ_H__ */
56 
57 /*******************************************************************************
58  * EOF (not truncated)
59  ******************************************************************************/
60