! ! ************************************************************************* ! * * ! * © 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 ! ******************************************************************************************************************************** !*** MODULE $UGDEF *** !DEC$ OPTIONS/ALIGN=(RECORDS=PACKED,COMMONS=PACKED)/NOWARN ! ++ ! Define random constants here ! -- PARAMETER UC$C_MAX_RETRY = '00000005'X ! ++ ! Define Pipe state information ! -- PARAMETER UG$_PIPE_STATE_ACTIVE = '00000001'X PARAMETER UG$_PIPE_STATE_STALLED = '00000002'X PARAMETER UG$_PIPE_STATE_IDLE = '00000003'X ! ++ ! Define endpoint/pipe type. It is really the endpoint type but we are ! not exposing endpoints just their associated pipes. ! -- PARAMETER UG$_PIPE_TYPE_CONTROL = '00000000'X PARAMETER UG$_PIPE_TYPE_ISOCHRONOUS = '00000001'X PARAMETER UG$_PIPE_TYPE_BULK = '00000002'X PARAMETER UG$_PIPE_TYPE_INTERRUPT = '00000003'X ! ++ ! 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 PARAMETER UG$_ENABLE_AST = '00000001'X PARAMETER UG$_ASSOCIATE = '00000002'X PARAMETER UG$_DISASSOCIATE = '00000003'X PARAMETER UG$_SET_PIPE_STATE = '00000004'X PARAMETER UG$_DEVICE_REQUEST = '00000005'X ! SENSE OPTIONS PARAMETER UG$_GET_PIPE_COUNT = '00000001'X PARAMETER UG$_GET_PIPE_HANDLES = '00000002'X PARAMETER UG$_GET_PIPE_TYPE = '00000003'X PARAMETER UG$_GET_PIPE_STATE = '00000004'X PARAMETER UG$_GET_PIPE_SIZE = '00000005'X PARAMETER UG$_GET_PIPE_DIRECTION = '00000006'X ! ++ ! Define constants for pipe direction ! -- PARAMETER USB$_DIRECTION_OUT = '00000001'X PARAMETER USB$_DIRECTION_IN = '00000002'X PARAMETER UG$_GET_DEVICE_DESCRIPTOR = '00000007'X PARAMETER UG$_GET_INTERFACE_DESCRIPTOR = '00000008'X ! ++ ! Define pipe transfer flags only SHORT_XFER_OK should be used at the present ! time. ! -- PARAMETER USB$_XFER_SETUP = '00000000'X PARAMETER USB$_XFER_OUT = '00000001'X PARAMETER USB$_XFER_IN = '00000002'X PARAMETER USB$_SHORT_XFER_OK = '00000004'X PARAMETER USB$_REQUEST_WAIT = '00000008'X ! ++ ! Define the Device request buffer layout ! -- PARAMETER UG$M_RECIPIENT = '0000001F'X PARAMETER UG$_RECIPIENT_DEVICE = '00000000'X PARAMETER UG$_RECIPIENT_INTERFACE = '00000001'X PARAMETER UG$_RECIPIENT_ENDPOINT = '00000002'X PARAMETER UG$_RECIPIENT_OTHER = '00000003'X PARAMETER UG$M_TYPE = '00000060'X PARAMETER UG$_TYPE_STANDARD = '00000000'X PARAMETER UG$_TYPE_CLASS = '00000001'X PARAMETER UG$_TYPE_VENDOR = '00000002'X PARAMETER UG$M_DIRECTION = '00000080'X PARAMETER UG$_HOST_TO_DEVICE = '00000000'X PARAMETER UG$_DEVICE_TO_HOST = '00000001'X PARAMETER UG$_REQUEST_GET_STATUS = '00000000'X ! bmRequestType can be 0x80, 0x81, 0x82 PARAMETER UG$_REQUEST_CLEAR_FEATURE = '00000001'X ! bmRequestType can be 0x00, 0x01, 0x02 PARAMETER UG$_REQUEST_SET_FEATURE = '00000003'X ! bmRequestType can be 0x00, 0x01, 0x02 PARAMETER UG$_REQUEST_SET_ADDRESS = '00000005'X ! bmRequestType is 0x00 PARAMETER UG$_REQUEST_GET_DESCRIPTOR = '00000006'X ! bmRequestType is 0x80 PARAMETER UG$_REQUEST_SET_DESCRIPTOR = '00000007'X ! bmRequestType is 0x00 PARAMETER UG$_REQUEST_GET_CONFIGURATION = '00000008'X ! bmRequestType is 0x80 PARAMETER UG$_REQUEST_SET_CONFIGURATION = '00000009'X ! bmRequestType is 0x00 PARAMETER UG$_REQUEST_GET_INTERFACE = '0000000A'X ! bmRequestType is 0x81 PARAMETER UG$_REQUEST_SET_INTERFACE = '0000000B'X ! bmRequestType is 0x01 PARAMETER UG$_REQUEST_SYNCH_FRAME = '0000000C'X ! bmRequsType is 0x82 STRUCTURE /Device_Request/ UNION MAP BYTE UG$b_bmRequestType END MAP MAP PARAMETER UG$S_RECIPIENT = 5 PARAMETER UG$V_RECIPIENT = 0 PARAMETER UG$S_TYPE = 2 PARAMETER UG$V_TYPE = 5 PARAMETER UG$S_DIRECTION = 1 PARAMETER UG$V_DIRECTION = 7 BYTE %FILL (1) END MAP END UNION BYTE UG$b_bRequest INTEGER*2 UG$w_wValue INTEGER*2 UG$w_wIndex INTEGER*2 UG$w_wlength END STRUCTURE ! Device_Request ! ++ ! Define a standard device descriptor ! -- STRUCTURE /Device_Descriptor/ BYTE UG$b_bLength ! Descriptor length in bytes BYTE UG$b_bDescriptorType ! Descriptor type constant 0X01 INTEGER*2 UG$w_bcdUSB ! BCD encoded specification release number BYTE UG$b_bDeviceClass ! Device class code BYTE UG$b_bDeviceSubClass ! Device sub class code BYTE UG$b_bDeviceProtocol ! Device protocol BYTE UG$b_bMaxPacket ! Maximu packet size for control pipe 8, 16, 32, 64 are valide INTEGER*2 UG$w_idVendor ! Vendor ID INTEGER*2 UG$w_idProduct ! Product ID INTEGER*2 UG$w_bcdDevice ! BCD encoded device release number BYTE UG$b_iManufacturer ! Index of string descriptor describing manufacturer BYTE UG$b_iProduct ! Index of string descriptor describing product BYTE UG$b_iSerailNumber ! Index of string descriptor of devices serial number BYTE UG$b_bNumConfigurations ! Number of possible device configurations END STRUCTURE ! Device_Descriptor ! ++ ! Define a standard interface descriptor ! -- STRUCTURE /Interface_Descriptor/ BYTE UG$b_bLength ! Descriptor length in bytes BYTE UG$b_bDescriptorType ! Descriptor type constant 0X04 BYTE UG$b_bInterfaceNumber ! zero based count of what interface this is. BYTE UG$b_bAlternateSetting ! Used to select alternate setting for interface BYTE UG$B_BnumEndpoints ! Number of endpoints for interface BYTE UG$b_bInterfaceClass ! Interface class code BYTE UG$b_bInterfaceSubClass ! Interface sub class code BYTE UG$b_bInterfaceProtocol ! Interface protocol BYTE UG$b_iInterface ! Index of string descriptor that describes this interface END STRUCTURE ! Interface_Descriptor !DEC$ END OPTIONS