1 /* SPDX-License-Identifier: Apache-2.0 */ 2 /* 3 * Copyright (c) 2006-2018, RT-Thread Development Team 4 * 5 * SPDX-License-Identifier: Apache-2.0 6 * 7 * Change Logs: 8 * Date Author Notes 9 * 2017-11-24 勤为本 first version 10 * 2018-05-11 zhuangwei add gpio interrupt ops 11 */ 12 13 #ifndef __DRV_GPIO_H__ 14 #define __DRV_GPIO_H__ 15 16 #include <rthw.h> 17 18 struct gpio_irq_def 19 { 20 void *irq_arg[32]; 21 void (*irq_cb[32])(void *param); 22 rt_uint8_t irq_type[32]; 23 rt_uint8_t state[32]; 24 }; 25 26 struct loongson_gpio { 27 rt_uint64_t GPIO0_OEN; 28 rt_uint64_t GPIO1_OEN; /* Reserved */ 29 rt_uint64_t GPIO0_O; 30 rt_uint64_t GPIO1_O; /* Reserved */ 31 rt_uint64_t GPIO0_I; 32 rt_uint64_t GPIO1_I; /* Reserved */ 33 rt_uint64_t GPIO0_INTEN; 34 rt_uint64_t GPIO1_INTEN; /* Reserved */ 35 }; 36 37 int loongson_pin_init(void); 38 39 #endif 40 41