Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This function open the connection to the selected by a number (starting from zero) Trenz Electronic USB FX2 device number  (Cypress driver derivative and VID = 0xbd0, PID=0x0300) connected to a host computer's USB port.

Description of internal procedure

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

If no device is attached, TE_USB_FX2_USB_device (CyUSBDevice type) is initialized to null. If one or more devices are attached and

  • if 0 ≤ CardNumber ≤ (number of attached devices – 1), then TE_USB_FX2_USBDevice (CyUSBDevice type) will point to and will be initialized according to the selected device.
  • if CardNumber ≥ number of attached devices, then TE_USB_FX2_USBDevice (CyUSBDevice type) is initialized to null.

A more intuitive name for this function would have been TE_USB_FX2_SelectCard().


Info
A more intuitive name for this function would have been TE_USB_FX2_SelectCard().

 

Use of the code

Declaration

...

This function returns true if it is able to find the module selected by CardNumber. If unable to do so, it returns false.