Your browser does not allow scripts
Please click here to view a static table of contents without scripts
Return to Introduction  Previous page  Next page
Read the contents of the EEPROM.


Handle of the device.
Pointer to structure of type FT_PROGRAM_DATA.

Return Value
FT_OK if successful, otherwise the return value is an FT error code.

This function interprets the parameter pData as a pointer to a struct of type FT_PROGRAM_DATA that contains storage for the data to be read from the EEPROM.

The function does not perform any checks on buffer sizes, so the buffers passed in the
FT_PROGRAM_DATA struct must be big enough to accommodate their respective strings (including null terminators). The sizes shown in the following example are more than adequate and can be rounded down if necessary. The restriction is that the Manufacturer string length plus the Description string length is less than or equal to 40 characters.

Note that the DLL must be informed which version of the
FT_PROGRAM_DATA structure is being used. This is done through the Signature1, Signature2 and Version elements of the structure. Signature1 should always be 0x00000000, Signature2 should always be 0xFFFFFFFF and Version can be set to use whichever version is required. For compatibility with all current devices Version should be set to the latest version of the FT_PROGRAM_DATA structure which is defined in FTD2XX.h.

FT_HANDLE ftHandle;
FT_STATUS ftStatus = FT_Open(0, &ftHandle);
if (ftStatus != FT_OK) {
    // FT_Open FAILED!

char ManufacturerBuf[32];
char ManufacturerIdBuf[16];
char DescriptionBuf[64];
char SerialNumberBuf[16];

ftData.Signature1 = 0x00000000;
ftData.Signature2 = 0xffffffff;
ftData.Version = 0x00000002;      // EEPROM structure with FT232R extensions
ftData.Manufacturer = ManufacturerBuf;
ftData.ManufacturerId = ManufacturerIdBuf;
ftData.Description = DescriptionBuf;
ftData.SerialNumber = SerialNumberBuf;

ftStatus = FT_EE_Read(ftHandle, &ftData);
if (ftStatus == FT_OK) {
    // FT_EE_Read OK, data is available in ftData
else {
    // FT_EE_Read FAILED!