阅读:1374回复:3
如何进行厂商请求
如何进行厂商请求,用 UsbBuildVendorRequest是吗?能否举一个例子?
|
|
沙发#
发布于:2005-02-26 12:00
如何进行厂商请求,用 UsbBuildVendorRequest是吗?能否举一个例子? 比如: UsbBuildVendorRequest(urb, URB_FUNCTION_VENDOR_DEVICE, (USHORT) siz, 0, 0x0, 0x0C, wValue, wIndex, pbyData, NULL, length, NULL); |
|
|
板凳#
发布于:2005-02-26 12:45
UsbBuildVendorRequest(urb, URB_FUNCTION_VENDOR_DEVICE, (USHORT) siz,
0,// 这个参数是什么意思 0x0,这个参数是什么意思 0x0C, 这个参数是什么意思 wValue, wIndex,//这是索引吗? pbyData, // 这个是输出的缓冲取吗? NULL, length, NULL); |
|
地板#
发布于:2005-02-26 14:35
UsbBuildVendorRequest(urb, URB_FUNCTION_VENDOR_DEVICE, (USHORT) siz, 0,// 这个参数是什么意思 TransferFlags Specifies zero, one, or a combination of the following flags: USBD_TRANSFER_DIRECTION_IN Is set to request data from a device. To transfer data to a device, this flag must be clear. The flag must be set if the pipe is an interrupt transfer pipe. USBD_SHORT_TRANSFER_OK Can be used if USBD_TRANSFER_DIRECTION_IN is set. If set, directs the HCD not to return an error if a packet is received from the device that is shorter than the maximum packet size for the endpoint. Otherwise, a short request is returns an error condition. 0x0,这个参数是什么意思 ReservedBits Specifies a value, from 4 to 31 inclusive, that becomes part of the request type code in the USB-defined setup packet. This value is defined by USB for a class request or the vendor for a vendor request. 0x0C, 这个参数是什么意思 Request Specifies the USB or vendor-defined request code for the device, interface, endpoint, or other device-defined target. wIndex,//这是索引吗? Index Specifies the device-defined identifier if the request is for an endpoint, interface, or device-defined target. Otherwise, Index must be 0. pbyData, // 这个是输出的缓冲取吗? 就是Points to a resident buffer for the transfer or is NULL if an MDL is supplied in TransferBufferMDL. The contents of this buffer depend on the value of TransferFlags. If USBD_TRANSFER_DIRECTION_IN is specified, this buffer will contain data read from the device on return from the HCD. Otherwise, this buffer contains driver-supplied data to be transferred to the device. |
|
|