; ; ************************************************************************* ; * * ; * © Copyright 2010, Hewlett-Packard Development Company, L.P. * ; * * ; * Confidential computer software. Valid license from HP and/or * ; * its subsidiaries required for possession, use, or copying. * ; * * ; * Consistent with FAR 12.211 and 12.212, Commercial Computer Software, * ; * Computer Software Documentation, and Technical Data for Commercial * ; * Items are licensed to the U.S. Government under vendor's standard * ; * commercial license. * ; * * ; * Neither HP nor any of its subsidiaries shall be liable for technical * ; * or editorial errors or omissions contained herein. The information * ; * in this document is provided "as is" without warranty of any kind and * ; * is subject to change without notice. The warranties for HP products * ; * are set forth in the express limited warranty statements accompanying * ; * such products. Nothing herein should be construed as constituting an * ; * additional warranty. * ; * * ; ************************************************************************* ; ******************************************************************************************************************************** ; Created: 30-Mar-2010 16:33:52 by OpenVMS SDL EV3-3 ; Source: 14-APR-2005 19:53:12 $1$DGA7374:[USB.SRC]UGDEF.SDL;1 ; ******************************************************************************************************************************** .MACRO $UGDEF,$GBL $DEFINI UG,$GBL ; ++ ; Define random constants here ; -- $EQU UC$C_MAX_RETRY 5 ; ++ ; Define Pipe state information ; -- $EQU UG$_PIPE_STATE_ACTIVE 1 $EQU UG$_PIPE_STATE_STALLED 2 $EQU UG$_PIPE_STATE_IDLE 3 ; ++ ; Define endpoint/pipe type. It is really the endpoint type but we are ; not exposing endpoints just their associated pipes. ; -- $EQU UG$_PIPE_TYPE_CONTROL 0 $EQU UG$_PIPE_TYPE_ISOCHRONOUS 1 $EQU UG$_PIPE_TYPE_BULK 2 $EQU UG$_PIPE_TYPE_INTERRUPT 3 ; ++ ; Define the various function options. Most of these should probably be ; OpenVMS funstion modifiers but changing adding them means that shipping ; without a new version of the O.S. is not possible. ; -- ; SET OPTIONS $EQU UG$_ENABLE_AST 1 $EQU UG$_ASSOCIATE 2 $EQU UG$_DISASSOCIATE 3 $EQU UG$_SET_PIPE_STATE 4 $EQU UG$_DEVICE_REQUEST 5 ; SENSE OPTIONS $EQU UG$_GET_PIPE_COUNT 1 $EQU UG$_GET_PIPE_HANDLES 2 $EQU UG$_GET_PIPE_TYPE 3 $EQU UG$_GET_PIPE_STATE 4 $EQU UG$_GET_PIPE_SIZE 5 $EQU UG$_GET_PIPE_DIRECTION 6 ; ++ ; Define constants for pipe direction ; -- $EQU USB$_DIRECTION_OUT 1 $EQU USB$_DIRECTION_IN 2 $EQU UG$_GET_DEVICE_DESCRIPTOR 7 $EQU UG$_GET_INTERFACE_DESCRIPTOR 8 ; ++ ; Define pipe transfer flags only SHORT_XFER_OK should be used at the present ; time. ; -- $EQU USB$_XFER_SETUP 0 $EQU USB$_XFER_OUT 1 $EQU USB$_XFER_IN 2 $EQU USB$_SHORT_XFER_OK 4 $EQU USB$_REQUEST_WAIT 8 ; ++ ; Define the Device request buffer layout ; -- $EQU UG$M_RECIPIENT <^X1F> $EQU UG$_RECIPIENT_DEVICE 0 $EQU UG$_RECIPIENT_INTERFACE 1 $EQU UG$_RECIPIENT_ENDPOINT 2 $EQU UG$_RECIPIENT_OTHER 3 $EQU UG$M_TYPE <^X60> $EQU UG$_TYPE_STANDARD 0 $EQU UG$_TYPE_CLASS 1 $EQU UG$_TYPE_VENDOR 2 $EQU UG$M_DIRECTION <^X80> $EQU UG$_HOST_TO_DEVICE 0 $EQU UG$_DEVICE_TO_HOST 1 $EQU UG$_REQUEST_GET_STATUS 0 ; bmRequestType can be 0x80, 0x81, 0x82 $EQU UG$_REQUEST_CLEAR_FEATURE 1 ; bmRequestType can be 0x00, 0x01, 0x02 $EQU UG$_REQUEST_SET_FEATURE 3 ; bmRequestType can be 0x00, 0x01, 0x02 $EQU UG$_REQUEST_SET_ADDRESS 5 ; bmRequestType is 0x00 $EQU UG$_REQUEST_GET_DESCRIPTOR 6 ; bmRequestType is 0x80 $EQU UG$_REQUEST_SET_DESCRIPTOR 7 ; bmRequestType is 0x00 $EQU UG$_REQUEST_GET_CONFIGURATION 8 ; bmRequestType is 0x80 $EQU UG$_REQUEST_SET_CONFIGURATION 9 ; bmRequestType is 0x00 $EQU UG$_REQUEST_GET_INTERFACE 10 ; bmRequestType is 0x81 $EQU UG$_REQUEST_SET_INTERFACE 11 ; bmRequestType is 0x01 $EQU UG$_REQUEST_SYNCH_FRAME 12 ; bmRequsType is 0x82 $EQU UG$S_Device_Request 8 $EQU UG$S_bmRequestType_overlay 1 $EQU UG$r_bmRequestType_overlay 0 $EQU UG$b_bmRequestType 0 $EQU UG$S_RECIPIENT 5 $EQU UG$V_RECIPIENT 0 $EQU UG$S_TYPE 2 $EQU UG$V_TYPE 5 $EQU UG$V_DIRECTION 7 $EQU UG$b_bRequest 1 $EQU UG$w_wValue 2 $EQU UG$w_wIndex 4 $EQU UG$w_wlength 6 ; ++ ; Define a standard device descriptor ; -- $EQU UG$S_Device_Descriptor 18 $EQU UG$b_bLength 0 ; Descriptor length in bytes $EQU UG$b_bDescriptorType 1 ; Descriptor type constant 0X01 $EQU UG$w_bcdUSB 2 ; BCD encoded specification release number $EQU UG$b_bDeviceClass 4 ; Device class code $EQU UG$b_bDeviceSubClass 5 ; Device sub class code $EQU UG$b_bDeviceProtocol 6 ; Device protocol $EQU UG$b_bMaxPacket 7 ; Maximu packet size for control pipe 8, 16, 32, 64 are valide $EQU UG$w_idVendor 8 ; Vendor ID $EQU UG$w_idProduct 10 ; Product ID $EQU UG$w_bcdDevice 12 ; BCD encoded device release number $EQU UG$b_iManufacturer 14 ; Index of string descriptor describing manufacturer $EQU UG$b_iProduct 15 ; Index of string descriptor describing product $EQU UG$b_iSerailNumber 16 ; Index of string descriptor of devices serial number $EQU UG$b_bNumConfigurations 17 ; Number of possible device configurations ; ++ ; Define a standard interface descriptor ; -- $EQU UG$S_Interface_Descriptor 9 $EQU UG$b_bLength 0 ; Descriptor length in bytes $EQU UG$b_bDescriptorType 1 ; Descriptor type constant 0X04 $EQU UG$b_bInterfaceNumber 2 ; zero based count of what interface this is. $EQU UG$b_bAlternateSetting 3 ; Used to select alternate setting for interface $EQU UG$B_BnumEndpoints 4 ; Number of endpoints for interface $EQU UG$b_bInterfaceClass 5 ; Interface class code $EQU UG$b_bInterfaceSubClass 6 ; Interface sub class code $EQU UG$b_bInterfaceProtocol 7 ; Interface protocol $EQU UG$b_iInterface 8 ; Index of string descriptor that describes this interface $DEFEND UG,$GBL,DEF .ENDM