RxUsbDeviceGetDescriptor
Appearance
Description
Executes the Standard Device Request that obtains the Device Descriptor.
Syntax
rc = RxUsbDeviceGetDescriptor(Handle,Length,Descriptor)
Parameters
- Handle
- the Device Handle received from the previous RxUsbOpen.
- Length
- the desired number of bytes or 0 for the whole Device Descriptor.
- Descriptor
- the name of the variable to receive the Device Descriptor.
Return Code
Errors
Remarks
Example Code
/* add RxUsbDeviceGetDescriptor */ rc = RxFuncAdd('RxUsbDeviceGetDescriptor','usbcalls','RxUsbDeviceGetDescriptor') say '+RxUsbDeviceGetDescriptor(),RC=0x'd2x(rc) /* invoke RxUsbDeviceGetDescriptor */ Length=18 /* to receive whole descriptor */ drop Descriptor /* receives device descriptor */ rc = RxUsbDeviceGetDescriptor(Handle,Length,Descriptor) say '*RxUsbDeviceGetDescriptor(),RC=0x'd2x(rc) /* drop RxUsbDeviceGetDescriptor */ rc = RxFuncDrop('RxUsbDeviceGetDescriptor') say '-RxUsbDeviceGetDescriptor(),RC=0x'd2x(rc)