Jump to content

RxUsbQueryDeviceReport: Difference between revisions

From EDM2
Created page with "==Description== Obtains the Compound Descriptor of a specific USB device. ==Syntax== <pre> rc = RxUsbQueryDeviceReport(Handle,Report) </pre> ==Parameters== ; Handle : the D..."
 
Ak120 (talk | contribs)
mNo edit summary
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
==Description==
Obtains the Compound Descriptor of a specific USB device.  
Obtains the Compound Descriptor of a specific USB device.  


==Syntax==
==Syntax==
''For access by Device Handle use:''
<pre>
<pre>
rc = RxUsbQueryDeviceReport(Handle,Report)
rc = RxUsbQueryDeviceReport(Handle,Report)
</pre>
''For access by Device Number use:''
<pre>
rc = RxUsbQueryDeviceReport(Number,Report)
</pre>
</pre>


==Parameters==
==Parameters==
; Handle : the Device Handle received from the previous RxUsbOpen.  
; Handle : the Device Handle received from the previous RxUsbOpen.  
 
; Number : the Device Number from 1 up to the Total Number from RxUsbQueryNumberDevices.
; Report :  receives the Compound Descriptor as hexadecimal string. The Compound Descriptor is the concatenation of Device Descriptor and Configuration Descriptor. 
; Report :  receives the Compound Descriptor as hexadecimal string.


==Return Code==
==Return Code==
 
<pre>
0x0000 - NO_ERROR
</pre>
===Errors===
===Errors===
 
<pre>
0x0057 - ERROR_INVALID_PARAMETER
0x1B58 - USB_NOT_INIT
0xFF13 - ERROR_I24_INVALID_PARAMETER
0xFF1F - ERROR_GEN_FAILURE
0xFF37 - ERROR_DEV_NOT_EXIST
0xFF57 - ERROR_INVALID_PARAMETER
0xFF6F - ERROR_BUFFER_OVERFLOW
0xFFEA - ERROR_MORE_DATA
</pre>
==Remarks==
==Remarks==
 
The Compound Descriptor is the concatenation of Device Descriptor and Configuration Descriptor. 
==Example Code==
==Example Code==
<pre>
<pre>
/* add RxUsbQueryDeviceReport */
/* add RxUsbQueryDeviceReport */
rc = RxFuncAdd('RxUsbQueryDeviceReport','usbcalls','RxUsbQueryDeviceReport')
rc = RxFuncAdd('RxUsbQueryDeviceReport','usbcalls','RxUsbQueryDeviceReport')
Line 34: Line 47:
rc = RxFuncDrop('RxUsbQueryDeviceReport')
rc = RxFuncDrop('RxUsbQueryDeviceReport')
say '-RxUsbQueryDeviceReport(),RC=0x'd2x(rc)
say '-RxUsbQueryDeviceReport(),RC=0x'd2x(rc)
 
</pre>
</pre>


==Related Functions==
==Related Functions==
* [[RxUsbQueryDeviceInfo]]
* [[RxUsbQueryNumberDevices]]
* [[RxUsbOpen]]


[[Category:USBCalls]]
[[Category:USBCalls]]

Latest revision as of 09:22, 5 March 2018

Obtains the Compound Descriptor of a specific USB device.

Syntax

For access by Device Handle use:

rc = RxUsbQueryDeviceReport(Handle,Report)

For access by Device Number use:

rc = RxUsbQueryDeviceReport(Number,Report)

Parameters

Handle
the Device Handle received from the previous RxUsbOpen.
Number
the Device Number from 1 up to the Total Number from RxUsbQueryNumberDevices.
Report
receives the Compound Descriptor as hexadecimal string.

Return Code

0x0000 - NO_ERROR

Errors

0x0057 - ERROR_INVALID_PARAMETER
0x1B58 - USB_NOT_INIT
0xFF13 - ERROR_I24_INVALID_PARAMETER
0xFF1F - ERROR_GEN_FAILURE
0xFF37 - ERROR_DEV_NOT_EXIST
0xFF57 - ERROR_INVALID_PARAMETER
0xFF6F - ERROR_BUFFER_OVERFLOW
0xFFEA - ERROR_MORE_DATA

Remarks

The Compound Descriptor is the concatenation of Device Descriptor and Configuration Descriptor.

Example Code

/* add RxUsbQueryDeviceReport */
rc = RxFuncAdd('RxUsbQueryDeviceReport','usbcalls','RxUsbQueryDeviceReport')
say '+RxUsbQueryDeviceReport(),RC=0x'd2x(rc)

/* invoke RxUsbQueryDeviceReport */
drop Report /* receives device report */
rc = RxUsbQueryDeviceReport(Handle,Report)
say '*RxUsbQueryDeviceReport(),RC=0x'd2x(rc)

/* drop RxUsbQueryDeviceReport */
rc = RxFuncDrop('RxUsbQueryDeviceReport')
say '-RxUsbQueryDeviceReport(),RC=0x'd2x(rc)

Related Functions