RxUsbOpen: Difference between revisions
Appearance
Created page with "==Description== Acquires access to a specific USB device. ==Syntax== Acquires access to a specific USB device. <pre> rc = RxUsbOpen(Handle,EnumDevice,idVendor,idProduct) <..." |
(No difference)
|
Revision as of 04:23, 6 January 2017
Description
Acquires access to a specific USB device.
Syntax
Acquires access to a specific USB device.
rc = RxUsbOpen(Handle,EnumDevice,idVendor,idProduct)
Acquires access to a more specific USB device.
rc = RxUsbOpen(Handle,EnumDevice,idVendor,idProduct,bcdDevice)
Parameters
- Handle
- receives Device Handle to be used to access this USB device.
- EnumDevice
- use 0 to accept any specified device or N for the Nth device.
- idVendor
- the Vendor Identifier (VendorID) from the device descriptor.
- idProduct
- the Product Identifier (ProductID) from the device descriptor.
- bcdDevice
- the Device Release Number from the device descriptor.
Return Code
Errors
Remarks
Example Code
/* add RxUsbOpen */ rc = RxFuncAdd('RxUsbOpen','usbcalls','RxUsbOpen') say '+RxUsbOpen(),RC=0x'd2x(rc) /* invoke RxUsbOpen */ drop Handle /* receives device handle */ EnumDevice=0 /* accept any free device */ idVendor=x2d(046D) /* vendor identifier */ idProduct=x2d(0804) /* product identifier */ bcdDevice=x2d(0009) /* device release number */ rc = RxUsbOpen(Handle,EnumDevice,idVendor,idProduct,bcdDevice) say '*RxUsbOpen(),RC=0x'd2x(rc) /* drop RxUsbOpen */ rc = RxFuncDrop('RxUsbOpen') say '-RxUsbOpen(),RC=0x'd2x(rc)