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.

11 D2XX Programmer's Guide2.4 FT_OpenOpen the device and return a handle which will be used for subsequent accesses.FT_STATUS FT_Open (int iDevice, FT_HANDLE *ftHandle)ParametersiDevice Must be 0 if only one device is attached. For multiple devices 1,2 etc.ftHandlePointer to a variable of type FT_HANDLE where the handle willbe stored. This handle must be used to access the device.Return ValueFT_OK if successful, otherwise the return value is an FT error code.RemarksAlthough this function can be used to open multiple devices by setting iDevice to 0, 1, 2 etc. thereis no ability to open a specific device. To open named devices, use the function FT_OpenEx 12 .ExampleThis sample shows how to open a device.FT_HANDLE ftHandle;FT_STATUS ftStatus;ftStatus = FT_Open(0,&ftHandle);if (ftStatus == FT_OK) {// FT_Open OK, use ftHandle to access device}else {// FT_Open failed}© Future Technology Devices International Ltd. 2005

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

Saved successfully!

Ooh no, something went wrong!