question

r-kawaida avatar image
0 Votes"
r-kawaida asked PavelA edited

WDK create multiple descriptor with report Id's in a KMDF Driver

I am creating a KMDF driver for a device. But, then I need to add two other drivers mouse and keyboard.
So, my question is if it is that in a single driver I can put in the descriptor for the three devices or the correct thing is to create a driver with its descriptor for each device.
There is so much information on the internet and ways to implement it that I don't know what is correct or at least reasonable.

  1. Mouse, keyboard and other -> a driver (descriptor [mouse, keyboard and other])

  2. Create by each one separately.
    - mouse -> driver1 (mouse descriptor)
    - keyboard -> driver2 (keyboard descriptor)
    - other -> driver3 (other descriptor)

How should I do?

windows-hardwarewindows-hardware-wdk
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

PavelA avatar image
0 Votes"
PavelA answered PavelA edited

Technically yes, you can create a composite device with 3 functions (and appropriate descriptors) if the hardware allows.
When each device corresponds to one USB function, you do not need to use HID report IDs.

If your 3rd function is HID as well, you can have only one USB function: a HID device with three top-level collections.
It will have one USB function descriptor and a more complex HID descriptor with multiple report IDs.
Or it can have two USB functions: one HID with two TLCs for keyboard and mouse, and 2nd function for the other device.


Regards,
-- pa

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.