This topic describes how a driver of a USB multi-function device, called a composite driver, can register and unregister the composite device with the underlying USB driver stack. The Microsoft-provided driver, Usbccgp.sys, is the default composite driver that is loaded by Windows. The procedure in this topic applies to a custom Windows Driver Model (WDM)-based composite driver that replaces Usbccgp.sys.
A Universal Serial Bus (USB) device can provide multiple functions that are active simultaneously. Such multi-function devices are also known as composite devices. For example, a composite device might define a function for the keyboard functionality and another function for the mouse. The functions of the device are enumerated by the composite driver. The composite driver can manage those functions itself in a monolithic model or create physical device objects (PDOs) for each of the functions. Those individual PDOs are managed by their respective USB function drivers, the keyboard driver and the mouse driver.
The USB 3.0 specification defines the function suspend and remote wake-up feature that enables individual functions to enter and exit low-power states without affecting the power state of other functions or the entire device. For more information about the feature, see How to Implement Function Suspend in a Composite Driver.
To use the feature, the composite driver needs to register the device with the underlying USB driver stack. Because the feature applies to USB 3.0 devices, the composite driver must make sure that the underlying stack supports version USBD_INTERFACE_VERSION_602. Through the registration request, the composite driver:
- Informs the underlying USB driver stack that the driver is responsible for sending a request to arm a function for remote wake-up. The remote wake-up request is processed by the USB driver stack, which sends the necessary protocol requests to the device.
- Obtains a list of function handles (one per function) assigned by the USB driver stack. The composite driver can then use a function handle in the driver's the request for remote wake-up of the function associated with the handle.
Typically a composite driver sends the registration request in the driver's AddDevice or the start-device routine to handle IRP_MN_START_DEVICE. Consequently, the composite driver releases the resources that are allocated for the registration in the driver's unload routines such as stop-device (IRP_MN_STOP_DEVICE) or remove-device routine (IRP_MN_REMOVE_DEVICE).
Device driver for all The Imaging Source USB cameras except the 33U, 37U, 38U and AFU auto focus series. Intel Core i3 or similar, 2 GB RAM; USB 3.0 or USB 2.0 controller (depends upon camera model) Graphics card with 24 or 32 bit. Using Windows 10 updated from Windows 8.1 on Aspire Z1-621 All in one pc. The USB 2.0-CRW has the warning triangle. It never will update. There also is a download trying to install on my computer every day for the past several months for the 'Realtek Semiconduct Corp.
Prerequisites
Before sending the registration request, make sure that:
- You have the number of functions in the device. That number can be derived the descriptors retrieved by the get-configuration request.
- You have obtained a USBD handle in a previous call to USBD_CreateHandle.
- The underlying USB driver stack supports USB 3.0 devices. To do so, call USBD_IsInterfaceVersionSupported and pass USBD_INTERFACE_VERSION_602 as the version to check.
For a code example, see How to Implement Function Suspend in a Composite Driver.Instructions
Register a Composite Device
The following procedure describes how you should build and send a registration request to associate a composite driver with the USB driver stack.
Allocate a COMPOSITE_DEVICE_CAPABILITIES structure and initialize it by calling the COMPOSITE_DEVICE_CAPABILITIES_INIT macro.
Set the CapabilityFunctionSuspend member of COMPOSITE_DEVICE_CAPABILITIES to 1.
Allocate a REGISTER_COMPOSITE_DEVICE structure and initialize the structure by calling the USBD_BuildRegisterCompositeDevice routine. In the call, specify the USBD handle, the initialized COMPOSITE_DEVICE_CAPABILITIES structure, and the number of functions.
Allocate an I/O request packet (IRP) by calling IoAllocateIrp and get a pointer to the IRP's first stack location (IO_STACK_LOCATION) by calling IoGetNextIrpStackLocation.
Their minds are always moving and they often speak before thinking about the impact of their words. They’re easily bored and have a short attention span. Position CThese are chaotic people who have a lot of trouble concentrating and sitting still. They shine most in a fast environment with loads of stimuli. They are very good listeners and are strongly in touch with their own feelings.
Allocate memory for a buffer that is large enough to hold an array of function handles (USBD_FUNCTION_HANDLE). The number of elements in the array must be the number of PDOs.
Build the request by setting the following members of the IO_STACK_LOCATION:
- Specify the type of request by setting Parameters.DeviceIoControl.IoControlCode to IOCTL_INTERNAL_USB_REGISTER_COMPOSITE_DEVICE.
- Specify the input parameter by setting Parameters.Others.Argument1 to the address of the initialized REGISTER_COMPOSITE_DEVICE structure.
- Specify the output parameter by setting AssociatedIrp.SystemBuffer to the buffer that was allocated in step 5.
Call IoCallDriver to send the request by passing the IRP to the next stack location.
Upon completion, inspect the array of function handles that is returned by the USB driver stack. You can store the array in the driver's device context for future use.
The following code example shows how to build and send a registration request. The example assumes that the composite driver stores the previously obtained number of functions and the USBD handle in the driver's device context.
Unregister the Composite Device
- Allocate an IRP by calling IoAllocateIrp and get a pointer to the IRP's first stack location (IO_STACK_LOCATION) by calling IoGetNextIrpStackLocation.
- Build the request by setting the Parameters.DeviceIoControl.IoControlCode member of IO_STACK_LOCATION to IOCTL_INTERNAL_USB_UNREGISTER_COMPOSITE_DEVICE.
- Call IoCallDriver to send the request by passing the IRP to the next stack location.
The IOCTL_INTERNAL_USB_UNREGISTER_COMPOSITE_DEVICE request is sent once by the composite driver in the context of remove-device routine. The purpose of the request is to remove the association between the USB driver stack and the composite driver and its enumerated function. The request also cleans up any resources that were created to maintain that association and all function handles that were returned in the previous registration request.
Download Acer Composite USB Device Driver
The following code example shows how to build and send a request to unregister the composite device. The example assumes that the composite driver was previously registered through a registration request as described earlier in this topic.
Related topics
IOCTL_INTERNAL_USB_REGISTER_COMPOSITE_DEVICE
IOCTL_INTERNAL_USB_UNREGISTER_COMPOSITE_DEVICE
Our database contains 1 drivers for SAMSUNG Android USB Composite Device. For uploading the necessary driver, select it from the list and click on ‘Download’ button. Please, assure yourself in the compatibility of the selected driver with your current OS just to guarantee its correct and efficient work.
Drivers List for SAMSUNG Android USB Composite DevicePages: 1 |
Download Acer Composite Usb Device Driver Updater
Pages: 1