Application Note
AN_329 User Guide For LibFT4222
Version 1.5
Document Reference No.: FT_001060 Clearance No.: FTDI#406
54
Product Page
Document Feedback Copyright © Future Technology Devices International Limited
3.6.7 I
2
C Master Reset
FT4222_STATUS FT4222_I2CMaster_Reset(FT_HANDLE ftHandle)
Supported Chip:
Summary:
Reset the I
2
C master device.
If the I
2
C bus encounters errors or works abnormally, this function will reset the I
2
C device. It is
not necessary to call I2CMaster_Init again after calling this reset function. This function will
maintain the original i2c master setting and clear all cache in the device. D2XX has similar
function(FT_PURGE) but strongly recommend to use FT4222_I2CMaster_Reset.
Parameters:
Return Value:
FT4222_OK if successful, otherwise the return value is an 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_I2CMaster_Init
3.7 I
2
C Slave Functions
The FT4222H device can be initialized as an I
2
C slave under mode 0 and mode 3. It conforms to
v2.1 and v3.0 of the I
2
C specification and supports all the transmission modes: Standard, Fast,
Fast-plus and High Speed.
When the I
2
C slave receives data from the I
2
C bus, it will keep the data in its internal receive
buffer (256 bytes), and then send the data to the USB host through IN packets.
When data is requested by an I
2
C master, data will be moved from an OUT packet to the transmit
register directly.
3.7.1 I
2
C Slave Init
FT4222_STATUS FT4222_I2CSlave_Init(FT_HANDLE ftHandle)
Summary:
Initialize FT4222H as an I
2
C slave. After FT4222_I2CSlave_Init , I2C slave address is reset to
0x40.