1 Star 0 Fork 4.9K

罗小黑 / docs

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
gpio_if-h.md 9.08 KB
一键复制 编辑 原始数据 按行查看 历史
wenjun 提交于 2020-09-08 10:08 . add OpenHarmony 1.0 baseline

gpio_if.h

Overview

Related Modules:

GPIO

Description:

Declares the standard GPIO interface functions.

Since:

1.0

Summary

Typedefs

Typedef Name

Description

GpioIrqFunc) (uint16_t gpio, void *data)

typedef int32_t(* 

Defines the function type of a GPIO interrupt service routine (ISR).

Enumerations

Enumeration Name

Description

GpioValue { GPIO_VAL_LOW = 0, GPIO_VAL_HIGH = 1, GPIO_VAL_ERR }

Enumerates GPIO level values.

GpioDirType { GPIO_DIR_IN = 0, GPIO_DIR_OUT = 1, GPIO_DIR_ERR }

Enumerates GPIO directions.

Functions

Function Name

Description

GpioRead (uint16_t gpio, uint16_t *val)

int32_t 

Reads the level value of a GPIO pin.

GpioWrite (uint16_t gpio, uint16_t val)

int32_t 

Writes the level value for a GPIO pin.

GpioSetDir (uint16_t gpio, uint16_t dir)

int32_t 

Sets the input/output direction for a GPIO pin.

GpioGetDir (uint16_t gpio, uint16_t *dir)

int32_t 

Obtains the input/output direction of a GPIO pin.

GpioSetIrq (uint16_t gpio, uint16_t mode, GpioIrqFunc func, void *arg)

int32_t 

Sets the ISR function for a GPIO pin.

GpioUnSetIrq (uint16_t gpio)

int32_t 

Cancels the setting of the ISR function for a GPIO pin.

GpioEnableIrq (uint16_t gpio)

int32_t 

Enables a GPIO pin interrupt.

GpioDisableIrq (uint16_t gpio)

int32_t 

Disables a GPIO pin interrupt.

1
https://gitee.com/lawguiren/docs.git
git@gitee.com:lawguiren/docs.git
lawguiren
docs
docs
master

搜索帮助