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 "interrupt.h"
18 #include "board.h"
19 
20 #define GPIO_IRQ_NUM 3
21 
22 #define IRQ_GPIO0               49
23 #define IRQ_GPIO1               50
24 #define IRQ_GPIO2               51
25 #define IRQ_GPIO3               52
26 
27 struct gpio_irq_def
28 {
29     void  *irq_arg[32];
30     void (*irq_cb[32])(void *param);
31     rt_uint8_t irq_type[32];
32 };
33 
34 enum gpio_irq_clock
35 {
36     GPIO_IRQ_LOSC_32KHZ = 0,
37     GPIO_IRQ_HOSC_24MHZ
38 };
39 
40 int rt_hw_gpio_init(void);
41 
42 #endif /* __DRV_GPIO_H__ */
43