Your browser does not allow scripts
Please click here to view a static table of contents without scripts
FT_EE_ProgramEx
Return to Introduction  Previous page  Next page
Program the EEPROM and pass strings separately.

FT_STATUS
FT_EE_ProgramEx
(FT_HANDLE ftHandle, PFT_PROGRAM_DATA pData, char *Manufacturer, char *ManufacturerId, char *Description, char *SerialNumber)



Parameters
ftHandle
Handle of the device.
pData
Pointer to a structure of type FT_PROGRAM_DATA.
*Manufacturer
Pointer to a null-terminated string containing the manufacturer name.
*ManufacturerID
Pointer to a null-terminated string containing the manufacturer ID.
*Description
Pointer to a null-terminated string containing the device description.
*SerialNumber
Pointer to a null-terminated string containing the device serial number.




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



Remarks
This variation of the FT_EE_Program function was included to provide support for languages such as LabVIEW where problems can occur when string pointers are contained in a structure.

This function interprets the parameter
pData as a pointer to a struct of type FT_PROGRAM_DATA that contains the data to write to the EEPROM. The data is written to EEPROM, then read back and verified.

The string pointer parameters in the FT_PROGRAM_DATA structure should be allocated as DWORDs to avoid overlapping of parameters. The string parameters are then passed in separately.

If the SerialNumber field is NULL, or SerialNumber points to a NULL string, a serial number based on the ManufacturerId and the current date and time will be generated.

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.

If
pData is NULL, the structure version will default to 0 (original BM series) and the device will be programmed with the default data:
{0x0403, 0x6001, "FTDI", "FT", "USB HS Serial Converter", "", 44, 1, 0, 1, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, 0}