IBASE IBD185 User Manual
Page 20

20 IBD185 User Guide
Sub Command Reply
Sub Command
Length
Sub Command
Code
Sub Command
Data
size of the
I2cApiDevRead_R
structure
I2CAPI_DEV_READ I2cApiDevRead_R structure
It contains the read back
data.
The reply packet contains the I2cApiDevRead_R structure.
The I2cApiDevRead_R structure returns the device received significant
arguments and followed by one byte result.
If the read operation has performed successfully, the result would be
equal to the value of “Dat Len” and the retrieved sequential reading
data bytes should concatenated to the result byte in the rear of packet,
otherwise the read operation has error, the returned packet would be
without reading data bytes.
I2cApiDevRead_R Structure
Field Type
Description
Bus ID
byte
Designate which I2C bus on MCU
1 – 1st I2C bus master
2 – 2nd I2C bus master
Slv Addr
byte
I2C slave address
Cmd Len
byte
Length of the command code
Flag byte operation
flag
0x00: Normal operation
0x01: Block operation
Dat Len
byte
Length of the data byte
Result byte
Operation
result
Result >=0 and Result <=32 : Done
Result >32 : Error
The read operation is Success if the “Result”
is equal to the number of bytes you want to
read.
Dat Buff
Array of byte Data bytes
The data bytes to read in sequence.