Intel® IXP400 Software
I2C Driver (IxI2cDrv)
Programmer’s Guide IXP400 Software Version 2.0 April 2005
Document Number: 252539, Revision: 007 339
26.4.3 I2C Using GPIO Versus Dedicated I2C Hardware
Some supported operating systems include support for emulating the I2C bus using GPIO lines on
the processor.
The I2C driver using a dedicated I2C hardware is a totally different implementation from the driver
using GPIO lines. Most of the APIs in a driver using a GPIO implementation are very low level
(dedicated to controlling the SDA and SCL lines) and combine to make one transaction. The driver
APIs using dedicated I2C hardware (such as with IxI2cDrv) will be limited to the control provided
by the hardware unit on the processor. Furthermore, the dedicated I2C hardware implementation
allows more advanced features supported by the hardware, such as those to support multi-master
on the bus, therefore allowing the IXP46X network processors to act as slave devices.
Figure 113. Sequence Flow Diagram for Slave Transmit in Polling Mode
B4378-01
client i2cDrv
ixI2cDrvSlaveAddrAndGenCallDetectedCheck
Check Slave Addr Detected
IX_I2C_SLAVE_ADDR_NOT_DETECTED
ixI2cDrvSlaveAddrAndGenCallDetectedCheck
Check Slave Addr Detected
IX_I2C_SLAVE_WRITE_DETECTED
store data into first buf
ixI2cDrvSlaveDataTransmit (first buf)
transmit data
IX_I2C_SLAVE_WRITE_BUFFER_EMPT Y
store data into second buf
ixI2cDrvSlaveOrGenDataReceive (second buf)
transmit data
IX_I2C_SUCCESS