I2c device write – IBASE IBD185 User Manual
Page 21

IBD185 User Guide
21
I2C Device Write
Perform an I2C bus write operation.
Sub Command Request
Sub Command
Length
Sub Command
Code
Sub Command
Data
size of the
I2cApiDevWrite_T
structure
I2CAPI_DEV_WRITE I2cApiDevWrite_T
structure
I2cApiDevWrite_T 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 following command code
Cmd Code Array of byte command code
Flag byte operation
flag
0x00: Normal operation
0x01: Block operation
Dat Len
byte
Number of the data bytes you want to write.
Dat Buff
Array of byte Data bytes
The data bytes to write in sequence.