GenericHID Demo, getting two devices in device manager (win7)

80 views
Skip to first unread message

theRat

unread,
Jun 12, 2011, 2:49:23 AM6/12/11
to LUFA Library Support List
Hi Guys,

I have just started looking at LUFA and have something strange
happening. I am using a atmega32u2 and have built the GenericHID
demo. All I did for this was to change the MCU = line in the makefile
and comment out the line clock_prescale_set(clock_div_1); in
GenericHID.c

I programmed it to the mcu and the device appeared immediately in
device manager under 'other devices' with the name of 'LUFA Generic
HID Demo". The pc then installed the device and it then appears under
'Human Interface Devices' as two seperate devices. The first is
called 'USB Input Device' and the second is 'HID-compliant device'.

My question is why are there two devices and why isn't it called 'LUFA
Generic HID Demo'?

Hopefully I have done something dumb and there is a simple
explanation.

Cheers
Simon

Dean Camera

unread,
Jun 13, 2011, 2:51:42 AM6/13/11
to LUFA Library Support List
Simon,

Having the two devices is normal - Windows will create the pair
automatically when the device is instantiated. I believe that one of
the device entries is the overall HID device driver instance for your
LUFA device, and the other is the virtual instance that handles the
generic HID report data, the colloray of which in a standard keyboard/
mouse device would appear under the "Mice" or "Keyboards" categories.
To be perfectly honest I haven't looked into the internal structure of
the Windows drivers much, but it's nothing to worry about.

As for the name of the devices, it appears that Windows will ignore
the strings returned by the device for the Device Manager display
name, and use the INF driver file's strings instead. Since the demo
uses Microsoft's inbuilt HID driver files, it gets a generic device
name.

Cheers!
- Dean
Reply all
Reply to author
Forward
0 new messages