Your browser does not allow scripts
Please click here to view a static table of contents without scripts
SPI_Open
Return to Introduction  Previous page  Next page
Open the device and return a handle that will be used for subsequent accesses. This function can only be used when there is a single FT2232C device connected.

FTC_STATUS
SPI_Open
(FTC_HANDLE *pftHandle)




Parameters
*pftHandle
Pointer to a variable of type FTC_HANDLE where the handle to the open device will be returned. This handle must then be used in all subsequent calls to access this device.




Return Value
FTC_SUCCESS if successful, otherwise the return value is one of the following FTC error codes:

   FTC_DEVICE_NOT_FOUND
   FTC_DEVICE_IN_USE
   FTC_TOO_MANY_DEVICES
   FTC_FAILED_TO_SYNCHRONIZE_DEVICE_MPSSE
   FTC_
FAILED_TO_COMPLETE_COMMAND
   FTC_IO_ERROR
   FTC_INSUFFICIENT_RESOURCES



Remarks
If more than one device is attached, this function will return an error code. For multiple devices, use SPI_GetDeviceNameLocID and then SPI_OpenEx instead.



Example

FTC_STATUS Status = FTC_SUCCESS;
FTC_HANDLE ftHandle;

Status = SPI_Open(&ftHandle);