驱动小牛
|
阅读:4342回复:6
关于URB结构体的定义
typedef struct _URB {
union { struct _URB_HEADER UrbHeader; struct _URB_SELECT_INTERFACE UrbSelectInterface; struct _URB_SELECT_CONFIGURATION UrbSelectConfiguration; struct _URB_PIPE_REQUEST UrbPipeRequest; struct _URB_FRAME_LENGTH_CONTROL UrbFrameLengthControl; struct _URB_GET_FRAME_LENGTH UrbGetFrameLength; struct _URB_SET_FRAME_LENGTH UrbSetFrameLength; struct _URB_GET_CURRENT_FRAME_NUMBER UrbGetCurrentFrameNumber; struct _URB_CONTROL_TRANSFER UrbControlTransfer; struct _URB_BULK_OR_INTERRUPT_TRANSFER UrbBulkOrInterruptTransfer; struct _URB_ISOCH_TRANSFER UrbIsochronousTransfer; // for standard control transfers on the default pipe struct _URB_CONTROL_DESCRIPTOR_REQUEST UrbControlDescriptorRequest; struct _URB_CONTROL_GET_STATUS_REQUEST UrbControlGetStatusRequest; struct _URB_CONTROL_FEATURE_REQUEST UrbControlFeatureRequest; struct _URB_CONTROL_VENDOR_OR_CLASS_REQUEST UrbControlVendorClassRequest; struct _URB_CONTROL_GET_INTERFACE_REQUEST UrbControlGetInterfaceRequest; struct _URB_CONTROL_GET_CONFIGURATION_REQUEST UrbControlGetConfigurationRequest; }; } URB, *PURB; UsbStruct.rar |
驱动小牛
|
沙发#
发布于:2008-05-19 17:31
struct _URB_HEADER {
// // Fields filled in by client driver // USHORT Length; // 0x00 USHORT Function; // 0x02 USBD_STATUS Status; // 0x04 // // Fields used only by USBD // PVOID UsbdDeviceHandle; // 0x08 // by USBD ULONG UsbdFlags; //0x0c flags field reserved for USBD use. };// sizeof == 0x10 |
驱动小牛
|
板凳#
发布于:2008-05-19 17:35
struct _URB_SELECT_INTERFACE {
#ifdef OSR21_COMPAT struct _URB_HEADER; // 0x00 #else struct _URB_HEADER Hdr; // 0x00 // function code indicates get or set. #endif USBD_CONFIGURATION_HANDLE ConfigurationHandle; // 0x10 // client must input AlternateSetting & Interface Number // class driver returns interface and handle // for new alternate setting USBD_INTERFACE_INFORMATION Interface; // 0x14 }; |
驱动小牛
|
地板#
发布于:2008-05-19 17:38
struct _URB_SELECT_CONFIGURATION {
#ifdef OSR21_COMPAT struct _URB_HEADER; // 0x00 #else struct _URB_HEADER Hdr; // 0x00 // function code indicates get or set. #endif // NULL indicates to set the device // to the 'unconfigured' state // ie set to configuration 0 PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor; // 0x10 USBD_CONFIGURATION_HANDLE ConfigurationHandle;// 0x19 USBD_INTERFACE_INFORMATION Interface;// 0x1d }; |
驱动小牛
|
地下室#
发布于:2008-05-19 17:39
struct _URB_PIPE_REQUEST {
#ifdef OSR21_COMPAT struct _URB_HEADER; // 0x00 #else struct _URB_HEADER Hdr; // 0x00 // function code indicates get or set. #endif USBD_PIPE_HANDLE PipeHandle; // 0x10 ULONG Reserved;// 0x14 };// 0x18 |
5楼#
发布于:2008-10-27 14:03
|
|
6楼#
发布于:2008-11-03 14:56
windows ddk 帮助上有详细的介绍。
|
|