1 /*
2  * Copyright (c) 2006-2021, RT-Thread Development Team
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Change Logs:
7  * Date           Author         Notes
8  * 2019-07-29     zdzn           first version
9  */
10 
11 #ifndef __DRV_GPIO_H__
12 #define __DRV_GPIO_H__
13 
14 #include <rtthread.h>
15 #include <rtdevice.h>
16 
17 #include "board.h"
18 #include "interrupt.h"
19 
20 
21 #define GPIO_IRQ_NUM 3
22 
23 #define IRQ_GPIO0               49
24 #define IRQ_GPIO1               50
25 #define IRQ_GPIO2               51
26 #define IRQ_GPIO3               52
27 
28 struct gpio_irq_def
29 {
30     void  *irq_arg[32];
31     void (*irq_cb[32])(void *param);
32     rt_uint8_t irq_type[32];
33 };
34 
35 enum gpio_irq_clock
36 {
37     GPIO_IRQ_LOSC_32KHZ = 0,
38     GPIO_IRQ_HOSC_24MHZ
39 };
40 
41 int rt_hw_gpio_init(void);
42 
43 #endif /* __DRV_GPIO_H__ */
44