You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.1 KiB

/*
* Copyright (c) Hisilicon Technologies Co., Ltd.. 2010-2019. All rights reserved.
* Description:head of gpio
*/
#ifndef __DRV_GPIO_H__
#define __DRV_GPIO_H__
#include "td_type.h"
#include "osal_ext.h"
#include "soc_log.h"
#include "drv_gpio_ext.h"
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif
#endif
#define gpio_check_ptr_return_if_fail(p) do { \
if ((p) == TD_NULL) { \
soc_log_err("Pointer is NULL !\n"); \
return SOC_ERR_GPIO_NULL_PTR; \
} \
} while (0)
td_s32 drv_gpio_query_interrupt(gpio_interrupt *pgpio_int_value);
td_s32 drv_gpio_open(td_void *private_data);
td_s32 drv_gpio_close(td_void *private_data);
td_s32 drv_gpio_set_output_type(td_u32 gpio_num, ext_gpio_outputtype output_type);
td_s32 drv_gpio_get_output_type(td_u32 gpio_num, ext_gpio_outputtype *poutput_type);
extern td_s32 ext_drv_gpio_pm_suspend(td_void *private_data);
extern td_s32 ext_drv_gpio_pm_resume(td_void *private_data);
#ifdef __cplusplus
#if __cplusplus
}
#endif
#endif
#endif