1 /* 2 * Copyright (C) 2022 HiSilicon (Shanghai) Technologies CO., LIMITED. 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License 6 * as published by the Free Software Foundation; either version 2 7 * of the License, or (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 */ 18 19 #ifndef __DRV_GPIO_H__ 20 #define __DRV_GPIO_H__ 21 22 #include "hi_type.h" 23 #include "drv_gpio_ioctl.h" 24 #include "hi_drv_gpio.h" 25 26 #ifdef __cplusplus 27 #if __cplusplus 28 extern "C" { 29 #endif 30 #endif 31 32 typedef enum { 33 GPIO_DRV_CHIP_V350 = 0x350, 34 GPIO_DRV_CHIP_BUTT 35 } gpio_drv_chip; 36 37 hi_s32 drv_gpio_query_int(gpio_int *p_gpio_int_value); 38 39 #if 1 40 hi_s32 drv_gpio_open(hi_void *private_data); 41 hi_s32 drv_gpio_close(hi_void *private_data); 42 #endif 43 44 hi_s32 drv_gpio_set_output_type(hi_u32 gpio_no, gpio_outputtype en_output_type); 45 hi_s32 drv_gpio_get_output_type(hi_u32 gpio_no, gpio_outputtype *p_en_output_type); 46 47 #ifdef __cplusplus 48 #if __cplusplus 49 } 50 #endif 51 #endif 52 53 #endif 54