Skip to content
Commit ac0beb70 authored by Daniel Leung's avatar Daniel Leung Committed by Anas Nashif
Browse files

i2c: add API for generic transfer



Add an API to I2C for generic transfer. This is for those data
transactions which are more complex than simple read or write.

One example use of this is to read register data from a slave
device. The master has to write the address of the register
to slave, then start reading from slave for register data.
In this situation, simple read or write is no longer
sufficient, as for some slave devices, they require RESTART
when data transfer direction changes. Doing a simple write via
i2c_write() results in STOP at end of transfer, which results
in the slave not responding to read request as it is not
expected to send anything back.

Change-Id: I22f9c5ba2f7a7c48a33b9cb1aaf559e596a85d39
Signed-off-by: default avatarDaniel Leung <daniel.leung@intel.com>
parent 76bfe7b3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment