EasyManua.ls Logo

FTDI LibFT4222 - Page 22

Default Icon
78 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Application Note
AN_329 User Guide For LibFT4222
Version 1.5
Document Reference No.: FT_001060 Clearance No.: FTDI#406
21
Product Page
Document Feedback Copyright © Future Technology Devices International Limited
FT4222 Rev D
YES
Summary:
Get the versions of FT4222H and LibFT4222.
Parameters:
ftHandle
Handle of the device.
pVersion
Pointer to a variable of type FT4222_Version where the value will be stored. Type
FT4222_Version is defined as follows:
struct FT4222_Version
{
DWORD chipVersion; // The version of FT4222H chip
DWORD dllVersion; // The version of LibFT4222
};
Revision A chips report chipVersion as 0x42220100.
Revision B chips report chipVersion as 0x42220200.
Revision C chips report chipVersion as 0x42220300.
Revision D chips report chipVersion as 0x42220400.
Revision B chips require version 1.2 or later of LibFT4222, indicated by dllVersion
being greater than 0x01020000;
Revision C chips require version 1.3 or later of LibFT4222, indicated by dllVersion
being greater than 0x01030000;
Revision D chips require version 1.4 or later of LibFT4222, indicated by dllVersion
being greater than 0x01040000.
Return Value:
FT4222_OK if successful, otherwise the return value is an FT error code.
Error code:
FT4222_DEVICE_NOT_SUPPORTED: This device is not a FT4222 chip.
FT4222_INVALID_POINTER: Parameter pVersion is NULL.
Example:
FT_HANDLE ftHandle = NULL;
FT_STATUS ftStatus;
FT4222_STATUS ft4222Status;
FT4222_Version ver;
ftStatus = FT_Open(0, &ftHandle);
if (FT_OK != ftStatus)
{
// open failed
return;
}
ft4222Status = FT4222_GetVersion(ftHandle, &ver);
if (FT4222_OK != ft4222Status)
{
// get version failed
return;
}
printf("%x %x\n",ver.chipVersion,ver.dllVersion);
FT_Close(ftHandle);

Table of Contents