...
Note | ||
---|---|---|
| ||
TE_USB_FX2_Open(USBdevList, x) acts more as a SelectCard() function because the list (handles) of USB devices is already created in USBdevList. |
The TE_USB_FX2_Close() function takes an already initialized USB device list (USBDeviceList) and closes the handle to the Trenz Electronic device driver, if one is open. This function closes all internal handles of USBDeviceList.
In the code, it is possible to call TE_USB_FX2_Open() where TE0300_Open() is used.
In the code, it is possible to call TE_USB_FX2_Close() where TE0300_Close() is used, but
...
...
Note 2:
In the code, it is possible to call TE_USB_FX2_Open() where TE0300_Open() is used.In the code, it is possible to call TE_USB_FX2_Close() where TE0300_Close() is used, but it is rare that you would ever need to call TE_USB_FX2_Close() explicitly (though doing so would not cause any problems). The TE_USB_FX2_Close() function closes the handle to the Trenz Electronic device driver, if one is open.
If TE_USB_FX2_Close() is called, then dynamically allocated members of the CCyUSBDevice class are de-allocated. And, all "shortcut" pointers to elements of the EndPoints array (ControlEndPt, IsocIn/OutEndPt, BulkIn/OutEndPt, InterruptIn/OutEndPt) are reset to NULL.
Close is automatically carried out by the TE_USB_FX2_Open() function, if a handle to the device driver is already open (i.e. a TE_USB_FX2_Open() has been successfully used before).
...