I2c device status – IBASE IBD185 User Manual
Page 17

IBD185 User Guide
17
I2C Device Status
Try to detect the slave device status on the specific I2C bus.
The slave address should be
left shift one bit to skip the position
of the LSB (R/W bit).
For Example:
Stuff the slave address with 0xA0
to designate the slave device which
7 bits slave address is 0x50.
Sub Command Request
Sub Command
Length
Sub Command
Code
Sub Command
Data
size of the
I2cApiDevStatus_T
structure
I2CAPI_DEV_STATUS I2cApiDevStatus_T
structure
I2cApiDevStatus_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
7bits I2C slave address
Sub Command Reply
Sub Command
Length
Sub Command
Code
Sub Command
Data
size of the
I2cApiDevStatus_R
structure+1
I2CAPI_DEV_STATUS I2cApiDevStatus_R
structure followed by
one byte I2cApiResult
The reply packet contains the I2cApiBusStatus_R structure and followed
by one byte of result.
I2cApiResult = 0 means the execution result is fail.
I2cApiDevStatus_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
Slv Status
byte
Status of the specific slave address
0:Not ready (Busy/Fail)
1:Ready