Description

This function takes an already initialized USB device list (USBDeviceList), searches for Trenz Electronic USB FX2 devices (Cypress driver derivative and VID = 0xbd0, PID=0x0300) and counts them.

This function returns the number of Trenz Electronic USB FX2 devices attached to the USB bus of the host computer.

Use of the code

Declaration

TE_USB_FX2_CYAPI int TE_USB_FX2_ScanCards(CCyUSBDevice *USBDeviceList)

Function Call

Your application program shall call this function like this:

TE_USB_FX2_ScanCards(USBDeviceList);

Parameters

CCyUSBDevice *USBDeviceList

CCyUSBDevice is a type defined in CyAPI.lib. Its name is misleading because it is not a class that represents a single USB device, but it rather represents a list of USB devices.
CCyUSBDevice is the list of devices served by the CyUSB.sys driver (or a derivative like TE_USB_FX2_xx.sys). This parameter is passed by pointer. See page 7 and pages 23-49 of CyAPI.pdf (Cypress CyAPI Programmer's Reference).

Return Value

int : integer type

This function returns the number of USB devices attached to the host computer USB bus.

  • No labels