Hi,
Synopsis:
I am writting a custom joystick driver. In a sense, what I have is a USB device that uses the standad windows drivers that come with the OS but it does not look like a joystick!
The hardware provides API so I can detect the axis/button values - and would like to make these be passed as joystick input to the OS (ie. make it look like a joystick)
After research, here’s what I found:
- Use KMDF (I can probably use UMDF but I perfer for performance reasons it to be a kernel driver)
- Since DInput looks at the VjoyD or HID stack I have the following options:
a. Using VJoyD, write mini driver, handle the 4 defined callbacks:
- Poll routine
- Configuration Manager callback
- Hardware capabilities callback
- Joystick identification callback
b. Use HID and write HID function driver or even HID mini driver
- Use the API that comes with the hardware, read the axis/button values and write it to a global buffer.
- Then handle the IO READ event and convert the joystick value to a HID report
What I would like ask you guys is if my 2 options are sound or should I pursue another option?
Anyone has experience with HID class devices? I looked at the samples in WDM and generating the HID report descriptor and the HID report is a mess - quite few values that you have to know to set and they have to be correct so the hardware looks like an joystick input device.
Any other input, suggestions is very much appreciated. Thanks in advance.
Btw, this will by my first driver. I have read quite a bit in WDF docs on joysticks and HID, looked at briefly at the USB spec and also reading currently Developing Drivers with the Microsoft Windows Driver Foundation. I have very basic understanding of WDM and the OS related aspects.