13 BOOLEAN IsFDO
; // is device a FDO or PDO
14 }COMMON_DEVICE_EXTENSION
, *PCOMMON_DEVICE_EXTENSION
;
18 COMMON_DEVICE_EXTENSION Common
; // shared with PDO
19 PDRIVER_OBJECT DriverObject
; // driver object
20 PDEVICE_OBJECT PhysicalDeviceObject
; // physical device object
21 PDEVICE_OBJECT NextDeviceObject
; // lower device object
22 PUSB_DEVICE_DESCRIPTOR DeviceDescriptor
; // usb device descriptor
23 PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor
; // usb configuration descriptor
24 DEVICE_CAPABILITIES Capabilities
; // device capabilities
25 PUSBD_INTERFACE_LIST_ENTRY InterfaceList
; // interface list
26 ULONG InterfaceListCount
; // interface list count
27 USBD_CONFIGURATION_HANDLE ConfigurationHandle
; // configuration handle
28 USBC_DEVICE_CONFIGURATION_INTERFACE_V1 BusInterface
; // bus custom enumeration interface
29 PUSBC_FUNCTION_DESCRIPTOR FunctionDescriptor
; // usb function descriptor
30 ULONG FunctionDescriptorCount
; // number of function descriptor
31 PDEVICE_OBJECT
* ChildPDO
; // child pdos
32 LIST_ENTRY ResetPortListHead
; // reset port list head
33 LIST_ENTRY CyclePortListHead
; // cycle port list head
34 UCHAR ResetPortActive
; // reset port active
35 UCHAR CyclePortActive
; // cycle port active
36 KSPIN_LOCK Lock
; // reset / cycle port list lock
37 }FDO_DEVICE_EXTENSION
, *PFDO_DEVICE_EXTENSION
;
39 #define USBCCPG_TAG 'cbsu'
43 COMMON_DEVICE_EXTENSION Common
; // shared with FDO
44 PUSBC_FUNCTION_DESCRIPTOR FunctionDescriptor
; // function descriptor
45 PDEVICE_OBJECT NextDeviceObject
; // next device object
46 DEVICE_CAPABILITIES Capabilities
; // device capabilities
47 ULONG FunctionIndex
; // function index
48 USB_DEVICE_DESCRIPTOR DeviceDescriptor
; // usb device descriptor
49 PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor
; // usb configuration descriptor
50 USBD_CONFIGURATION_HANDLE ConfigurationHandle
; // configuration handle
51 PUSBD_INTERFACE_LIST_ENTRY InterfaceList
; // interface list
52 ULONG InterfaceListCount
; // interface list count
53 PFDO_DEVICE_EXTENSION FDODeviceExtension
; // pointer to fdo's pdo list
54 }PDO_DEVICE_EXTENSION
, *PPDO_DEVICE_EXTENSION
;
59 DumpConfigurationDescriptor(
60 IN PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor
);
63 USBCCGP_GetDescriptors(
64 IN PDEVICE_OBJECT DeviceObject
);
67 USBCCGP_SelectConfiguration(
68 IN PDEVICE_OBJECT DeviceObject
,
69 IN PFDO_DEVICE_EXTENSION DeviceExtension
);
73 USBCCGP_GetDescriptor(
74 IN PDEVICE_OBJECT DeviceObject
,
75 IN UCHAR DescriptorType
,
76 IN ULONG DescriptorLength
,
77 IN UCHAR DescriptorIndex
,
79 OUT PVOID
*OutDescriptor
);
83 USBCCGP_GetStringDescriptor(
84 IN PDEVICE_OBJECT DeviceObject
,
85 IN ULONG DescriptorLength
,
86 IN UCHAR DescriptorIndex
,
88 OUT PVOID
*OutDescriptor
);
91 CountInterfaceDescriptors(
92 IN PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor
);
95 AllocateInterfaceDescriptorsArray(
96 IN PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor
,
97 OUT PUSB_INTERFACE_DESCRIPTOR
**OutArray
);
103 USBCCGP_SyncForwardIrp(
104 PDEVICE_OBJECT DeviceObject
,
108 USBCCGP_SyncUrbRequest(
109 IN PDEVICE_OBJECT DeviceObject
,
110 OUT PURB UrbRequest
);
114 IN POOL_TYPE PoolType
,
122 DumpFunctionDescriptor(
123 IN PUSBC_FUNCTION_DESCRIPTOR FunctionDescriptor
,
124 IN ULONG FunctionDescriptorCount
);
130 PDEVICE_OBJECT DeviceObject
,
137 PDEVICE_OBJECT DeviceObject
,
143 USBCCGP_QueryInterface(
144 IN PDEVICE_OBJECT DeviceObject
,
145 OUT PUSBC_DEVICE_CONFIGURATION_INTERFACE_V1 BusInterface
);
148 USBCCGP_EnumerateFunctions(
149 IN PDEVICE_OBJECT DeviceObject
);
151 #endif /* USBEHCI_H__ */