HP OpenVMS I/O User’s Reference Manual: OpenVMS Version 8.4 > Appendix E Programming USB Generic DriversE.3 Supported $QIO FunctionsThis section describes the $QIO function codes that the generic driver supports. IO$_READxBLK The driver treats read virtual, logical, and physical in the same way. Note that normal $QIO processing rules for logical and physical block I/O still apply and are enforced by the $QIO dispatching code. When a read is queued to a pipe, the driver checks to see if there is an outstanding I/O for that pipe. If one is found, the request is placed in the I/O queue of the pipe. If no I/O is outstanding, the driver starts the I/O queue for that pipe. The driver treats parameters from the $QIO P1-P6 as follows:
Status return codes are the usual OpenVMS ones for I/O devices. Because USB device status codes are a longword in length, after first checking the status word of the I/O status block, the application must check the second longword of the I/O status block. The second longword contains the USB status code for the request. The status word in the IOSB can indicate success but have a USB error in the second longword, shown as follows:
IO$_WRITExBLK The driver treats virtual, logical, and physical writes in the same way. Note that normal $QIO processing rules for logical and physical block I/O still apply and are enforced by the $QIO dispatching code. When a write is queued to a pipe, the driver checks to see if there is an outstanding I/O for that pipe. If one is found, the request is placed in the I/O queue of the pipe. If no I/O is outstanding, the driver starts an I/O queue for that pipe. The driver treats parameters from the $QIO P1-P6 as follows:
Status return codes are the usual OpenVMS ones for I/O devices. Because USB device status codes are a longword in length, after first checking the status word of the I/O status block, the application must check the second longword of the I/O status block. The second longword contains the USB status code for the request. (The status word in the IOSB can indicate success but have a USB error in the second longword.) IO$_SETMODE/CHAR Enable Unplug notification AST: This item allows an application to associate an AST that is delivered if a device is unplugged. You can use any channel to enable this AST. HP recommends that you use the control channel for this AST. To cancel the AST, do not supply an AST routine address and parameter. The driver treats parameters from the $QIO P1-P6 as follows:
Associate channel: Use this command to associate an OpenVMS channel to a pipe and to break the association of a channel to a pipe. The driver treats parameters from the $QIO P1-P6 as follows:
Set pipe state: Use this command to set the state of a pipe. The driver treats parameters from the $QIO P1-P6 as follows:
Send a control request:Use this command to send a device request to the device control pipe. For more details about device requests, see section 9.3 USB 1.1 or 2.0 specifications at http://www.usb.org/developers/docs/. The driver treats parameters from the $QIO P1-P6 as follows:
The following table shows the P1 buffer:
IO$_SENSEMODE/CHAR Get number of pipes Use this command to obtain the number of pipes. Make this the first operation that an application performs using the driver. Use the channel for the control connection for this operation. The driver treats parameters from the $QIO P1-P6 as follows:
Get pipe handles Use this command to obtain all the pipe handles. The buffer must have one quadword for each pipe of the device. The driver treats parameters from the $QIO P1-P6 as follows:
Get pipe direction Use this command to obtain the direction of a pipe associated with its handle. The driver treats parameters from the $QIO P1-P6 as follows:
Get pipe type Use this command to obtain the type of pipe associated with its handle. The driver treats parameters from the $QIO P1-P6 as follows:
Get pipe state Use this command to obtain the state of the pipe. The driver treats parameters from the $QIO P1-P6 as follows:
Get pipe size Use this command to obtain the size of the largest transfer on the pipe. (This is really the largest size that is sent on the bus in one transfer.) Actual requests can be larger. The driver takes care of splitting the transfer up into appropriately sized bus transfers. The driver treats parameters from the $QIO P1-P6 as follows:
Get pipe descriptor Use this routine is used to obtain the device descriptor from the device. The driver treats parameters from the $QIO P1-P6 as follows:
Table E-1 Format of the Device Descriptor
Get interface descriptor Use this command to obtain the interface descriptor from the device. The driver treats parameters from the $QIO P1-P6 as follows:
Table E-2 Format of the Interface Descriptor
|