Application Note
AN_329 User Guide For LibFT4222
Version 1.5
Document Reference No.: FT_001060 Clearance No.: FTDI#406
62
Product Page
Document Feedback Copyright © Future Technology Devices International Limited
3.7.8 I
2
C Slave Clock Stretch
FT4222_STATUS FT4222_I2CSlave_SetClockStretch(FT_HANDLE ftHandle, BOOL enable)
Supported Chip:
Summary:
Enable or disable Clock Stretch. The default setting of clock stretching is disabled.
Clock stretch is as a flow-control mechanism for slaves. An addressed slave device may hold the
clock line (SCL) low after receiving (or sending) a byte, indicating that it is not yet ready to
process more data. The master that is communicating with the slave may not finish the
transmission of the current bit, but must wait until the clock line actually goes high.
Parameters:
TRUE to enable I2C slave clock stretch
FALSE to disable I2C slave clock stretch
Return Value:
FT4222_OK if successful, otherwise the return value is a FT error code.
Error code:
FT4222_DEVICE_NOT_OPENED: The initialization API is not called.
FT4222_IS_NOT_I2C_MODE: The device is not in i2c slave mode
Prerequisite:
FT4222_I2CSlave_Init
Example:
Please refer to the example in FT4222_I2CSlave_Write.
3.7.9 I
2
C Slave Set Response Word
FT4222_STATUS FT4222_I2CSlave_SetRespWord (FT_HANDLE ftHandle, uint8 responseWord)
Supported Chip: