gpio有关函数
来源:互联网 发布:淘宝男士手表货到付款 编辑:程序博客网 时间:2024/05/03 04:24
1.gpio-cfg.h
struct s3c_gpio_cfg {
unsigned int cfg_eint;
s3c_gpio_pull_t (*get_pull)(struct s3c_gpio_chip *chip, unsigned offs);
int (*set_pull)(struct s3c_gpio_chip *chip, unsigned offs,
s3c_gpio_pull_t pull);
int (*set_pin)(struct s3c_gpio_chip *chip, unsigned offs,
s3c_gpio_pull_t level);
unsigned (*get_config)(struct s3c_gpio_chip *chip, unsigned offs);
int (*set_config)(struct s3c_gpio_chip *chip, unsigned offs,
unsigned config);
};
/* Defines for generic pin configurations */
#define S3C_GPIO_INPUT (S3C_GPIO_SPECIAL(0))
#define S3C_GPIO_OUTPUT (S3C_GPIO_SPECIAL(1))
#define S3C_GPIO_SFN(x) (S3C_GPIO_SPECIAL(x)) //S3C_GPIO_SFN(oxf) 在S5PV210平台为外部中断模式 EXIT_MODE;
#define s3c_gpio_is_cfg_special(_cfg) \
(((_cfg) & S3C_GPIO_SPECIAL_MARK) == S3C_GPIO_SPECIAL_MARK)
extern int s3c_gpio_cfgpin(unsigned int pin, unsigned int to);
extern unsigned s3c_gpio_getcfg(unsigned int pin);
#define S3C_GPIO_PULL_NONE ((__force s3c_gpio_pull_t)0x00)
#define S3C_GPIO_PULL_DOWN ((__force s3c_gpio_pull_t)0x01)
#define S3C_GPIO_PULL_UP ((__force s3c_gpio_pull_t)0x02)
extern int s3c_gpio_setpull(unsigned int pin, s3c_gpio_pull_t pull);
extern s3c_gpio_pull_t s3c_gpio_getpull(unsigned int pin);
#define S5P_GPIO_DRVSTR_LV1 ((__force s5p_gpio_drvstr_t)0x00)
#define S5P_GPIO_DRVSTR_LV2 ((__force s5p_gpio_drvstr_t)0x01)
#define S5P_GPIO_DRVSTR_LV3 ((__force s5p_gpio_drvstr_t)0x10)
#define S5P_GPIO_DRVSTR_LV4 ((__force s5p_gpio_drvstr_t)0x11)
extern s5p_gpio_drvstr_t s5p_gpio_get_drvstr(unsigned int pin);
extern int s5p_gpio_set_drvstr(unsigned int pin, s5p_gpio_drvstr_t drvstr);
2.linux/gpio.h
static inline int gpio_is_valid(int number)
static inline int gpio_request(unsigned gpio, const char *label)
static inline void gpio_free(unsigned gpio)
static inline int gpio_direction_input(unsigned gpio)
static inline int gpio_direction_output(unsigned gpio, int value)
static inline int gpio_get_value(unsigned gpio)
static inline void gpio_set_value(unsigned gpio, int value)
static inline int gpio_cansleep(unsigned gpio)
static inline int gpio_get_value_cansleep(unsigned gpio)
static inline void gpio_set_value_cansleep(unsigned gpio, int value)
static inline int gpio_export(unsigned gpio, bool direction_may_change)
static inline int gpio_export_link(struct device *dev, const char *name, unsigned gpio)
static inline int gpio_sysfs_set_active_low(unsigned gpio, int value)
static inline void gpio_unexport(unsigned gpio)
static inline int gpio_to_irq(unsigned gpio)
static inline int irq_to_gpio(unsigned irq)
- gpio有关函数
- gpio函数
- linux gpio驱动函数
- GPIO中断处理函数
- 有关函数。。。
- GPIO及中断API函数
- GPIO及中断API函数
- GPIO及中断API函数
- GPIO及中断API函数
- GPIO及中断API函数
- STM32 GPIO 简单操作函数
- GPIO及中断API函数
- GPIO及中断API函数
- GPIO及中断API函数
- STM32 GPIO之 GPIO_Init() 函数
- GPIO及中断API函数
- GPIO及中断API函数
- GPIO及中断API函数
- navigationController横竖屏高度问题
- 谷歌发布Android 4.2 详解果冻豆新特性
- css expression
- 甲骨文推出移动应用设计模式
- C#文件路径获取函数和文件名字获取函数
- gpio有关函数
- 浅析Android 4.2版本九大看点
- 一道逻辑题 - 拿走了哪个数
- 也说说extern "C"
- java 备份、还原oracle数据库
- 谷歌正式发布Android 4.2及Nexus新品
- 架设流媒体服务器
- 无须手动拼接 Android 4.2推新拍摄技术
- 新一代GoogleNexus手机采用硅谷数模SlimPort接口技术