15 // #include <usbprotocoldefs.h>
23 BOOLEAN IsFDO
; // is device a FDO or PDO
24 }COMMON_DEVICE_EXTENSION
, *PCOMMON_DEVICE_EXTENSION
;
28 COMMON_DEVICE_EXTENSION Common
; // shared with PDO
29 PDRIVER_OBJECT DriverObject
; // driver object
30 PDEVICE_OBJECT PhysicalDeviceObject
; // physical device object
31 PDEVICE_OBJECT NextDeviceObject
; // lower device object
32 PUSB_DEVICE_DESCRIPTOR DeviceDescriptor
; // usb device descriptor
33 PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor
; // usb configuration descriptor
34 DEVICE_CAPABILITIES Capabilities
; // device capabilities
35 PUSBD_INTERFACE_LIST_ENTRY InterfaceList
; // interface list
36 ULONG InterfaceListCount
; // interface list count
37 USBD_CONFIGURATION_HANDLE ConfigurationHandle
; // configuration handle
38 USBC_DEVICE_CONFIGURATION_INTERFACE_V1 BusInterface
; // bus custom enumeration interface
39 PUSBC_FUNCTION_DESCRIPTOR FunctionDescriptor
; // usb function descriptor
40 ULONG FunctionDescriptorCount
; // number of function descriptor
41 PDEVICE_OBJECT
* ChildPDO
; // child pdos
42 }FDO_DEVICE_EXTENSION
, *PFDO_DEVICE_EXTENSION
;
44 #define USBCCPG_TAG 'cbsu'
48 COMMON_DEVICE_EXTENSION Common
; // shared with FDO
49 PUSBC_FUNCTION_DESCRIPTOR FunctionDescriptor
; // function descriptor
50 PDEVICE_OBJECT NextDeviceObject
; // next device object
51 DEVICE_CAPABILITIES Capabilities
; // device capabilities
52 ULONG FunctionIndex
; // function index
53 }PDO_DEVICE_EXTENSION
, *PPDO_DEVICE_EXTENSION
;
58 USBCCGP_GetDescriptors(
59 IN PDEVICE_OBJECT DeviceObject
);
62 USBCCGP_SelectConfiguration(
63 IN PDEVICE_OBJECT DeviceObject
,
64 IN PFDO_DEVICE_EXTENSION DeviceExtension
);
68 USBCCGP_GetDescriptor(
69 IN PDEVICE_OBJECT DeviceObject
,
70 IN UCHAR DescriptorType
,
71 IN ULONG DescriptorLength
,
72 IN UCHAR DescriptorIndex
,
74 OUT PVOID
*OutDescriptor
);
80 USBCCGP_SyncForwardIrp(
81 PDEVICE_OBJECT DeviceObject
,
85 USBCCGP_SyncUrbRequest(
86 IN PDEVICE_OBJECT DeviceObject
,
91 IN POOL_TYPE PoolType
,
102 PDEVICE_OBJECT DeviceObject
,
109 PDEVICE_OBJECT DeviceObject
,
115 USBCCGP_QueryInterface(
116 IN PDEVICE_OBJECT DeviceObject
,
117 OUT PUSBC_DEVICE_CONFIGURATION_INTERFACE_V1 BusInterface
);
120 USBCCGP_EnumerateFunctions(
121 IN PDEVICE_OBJECT DeviceObject
);