RxUsbDeviceSetDescriptor
Appearance
Description
Warning: Do NOT use this function unless you know your USB device supports it.
Executes the Standard Device Request that updates the Device Descriptor.
Syntax
rc = RxUsbDeviceSetDescriptor(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 Device Descriptor appropriate for the device.
Return Code
Errors
Remarks
Warning: Do NOT use this function unless you know your USB device supports it.
Example Code
/* add RxUsbDeviceSetDescriptor */ rc = RxFuncAdd('RxUsbDeviceSetDescriptor','usbcalls','RxUsbDeviceSetDescriptor') say '+RxUsbDeviceSetDescriptor(),RC=0x'd2x(rc) /* invoke RxUsbDeviceSetDescriptor */ Length=18 /* to replace whole descriptor */ Descriptor=x2c(1201100100000040450C2D60010100010001) rc = RxUsbDeviceSetDescriptor(Handle,Length,Descriptor) say '*RxUsbDeviceSetDescriptor(),RC=0x'd2x(rc) /* drop RxUsbDeviceSetDescriptor */ rc = RxFuncDrop('RxUsbDeviceSetDescriptor') say '-RxUsbDeviceSetDescriptor(),RC=0x'd2x(rc)