21.07.2015 Views

Programming Info D2XXPG31.pdf

Programming Info D2XXPG31.pdf

Programming Info D2XXPG31.pdf

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

63 D2XX Programmer's Guide3.9 FT_EE_UAWriteWrite data into the EEUA.FT_STATUS FT_EE_UAWrite (FT_HANDLE ftHandle, PUCHAR pucData, DWORD dwDataLen)ParametersftHandlepucDatadwDataLenHandle of the device.Pointer to a buffer that contains the data to be written.Size, in bytes, of buffer that contains the data to be written.Return ValueFT_OK if successful, otherwise the return value is an FT error code.RemarksThis function interprets the parameter lpData as a pointer to an array of bytes of size dwDataLenthat contains the data to be written to the EEUA. It is a programming error for dwDataLen to begreater than the size of the EEUA.ExampleFT_HANDLE ftHandle;FT_STATUS ftStatus = FT_Open(0, &ftHandle);if (ftStatus != FT_OK) {// FT_Open FAILED!}char *buffer = "Hello, World";ftStatus = FT_EE_UAWrite(ftHandle, (unsigned char*)buffer, 12);if(ftStatus != FT_OK) {// FT_EE_UAWRITE failed}else {// FT_EE_UAWRITE failed}© Future Technology Devices International Ltd. 2005

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

Saved successfully!

Ooh no, something went wrong!