21.07.2015 Views

Programming Info D2XXPG31.pdf

Programming Info D2XXPG31.pdf

Programming Info D2XXPG31.pdf

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

EEPROM <strong>Programming</strong> Interface Functions623.8 FT_EE_UAReadRead the contents of the EEUA.FT_STATUS FT_EE_UARead (FT_HANDLE ftHandle, PUCHAR pucData, DWORD dwDataLen,LPDWORD lpdwBytesRead)ParametersftHandlepucDatadwDataLenlpdwBytesReadHandle of the device.Pointer to a buffer that contains storage for data to be read.Size, in bytes, of buffer that contains storage for the data to beread.Pointer to a DWORD that receives the number of bytes read..Return ValueFT_OK if successful, otherwise the return value is an FT error code.RemarksThis function interprets the parameter pucData as a pointer to an array of bytes of size dwDataLenthat contains storage for the data to be read from the EEUA. The actual number of bytes read isstored in the DWORD referenced by lpdwBytesRead.If dwDataLen is less than the size of the EEUA, then dwDataLen bytes are read into the buffer.Otherwise, the whole of the EEUA is read into the buffer.An application should check the function return value and lpdwBytesRead when FT_EE_UAReadreturns.ExampleFT_HANDLE ftHandle;FT_STATUS ftStatus = FT_Open(0, &ftHandle);if (ftStatus != FT_OK) {// FT_Open FAILED!}unsigned char Buffer[64];DWORD BytesRead;ftStatus = FT_EE_UARead(ftHandle, Buffer, 64, &BytesRead);if (ftStatus == FT_OK) {// FT_EE_UARead OK// User Area data stored in Buffer// Number of bytes read from EEUA stored in BytesRead}else {// FT_EE_UARead FAILED!}© Future Technology Devices International Ltd. 2005

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!