Intel IXP400 Frozen Dessert Maker User Manual


 
Intel
®
IXP400 Software
I
2
C Driver (IxI2cDrv)
Programmer’s Guide IXP400 Software Version 2.0 April 2005
Document Number: 252539, Revision: 007 339
26.4.3 I
2
C Using GPIO Versus Dedicated I
2
C Hardware
Some supported operating systems include support for emulating the I
2
C bus using GPIO lines on
the processor.
The I
2
C driver using a dedicated I
2
C 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 I
2
C hardware (such as with IxI2cDrv) will be limited to the control provided
by the hardware unit on the processor. Furthermore, the dedicated I
2
C 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_EMPTY
store data into second buf
ixI2cDrvSlaveOrGenDataReceive (second buf)
transmit data
IX_I2C_SUCCESS