1 Star 0 Fork 4.9K

taoguan / docs

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

i2c_if.h

Overview

Related Modules:

I2C

Description:

Declares the standard I2C interface functions.

Since:

1.0

Summary

Data Structures

Data Structure Name

Description

I2cMsg

Defines the I2C transfer message used during custom transfers.

Enumerations

Enumeration Name

Description

I2cFlag {   I2C_FLAG_READ = (0x1 << 0), I2C_FLAG_ADDR_10BIT = (0x1 << 4), I2C_FLAG_READ_NO_ACK = (0x1 << 11), I2C_FLAG_IGNORE_NO_ACK = (0x1 << 12),   I2C_FLAG_NO_START = (0x1 << 14), I2C_FLAG_STOP = (0x1 << 15) }

Enumerates flags used for transferring I2C messages.

Functions

Function Name

Description

I2cOpen (int16_t number)

struct DevHandle

Obtains the handle of an I2C controller.

I2cClose (struct DevHandle *handle)

void 

Releases the handle of an I2C controller.

I2cTransfer (struct DevHandle *handle, struct I2cMsg *msgs, int16_t count)

int32_t 

Launches a custom transfer to an I2C device.

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

搜索帮助