"Get the HID mouse class handle" in non-mouse related USB HID demo

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

"Get the HID mouse class handle" in non-mouse related USB HID demo

1,002 Views
crabbo_babbo
Contributor II

I imported a USB dev_hid_generic demo and saw this comment, after echoing "USB device HID generic demo".

 

 

        usb_echo("USB device HID generic demo\r\n");
        /* Get the HID mouse class handle */
        g_UsbDeviceHidGeneric.hidHandle = g_UsbDeviceHidConfigList.config->classHandle;

 

 

I wonder why is it there, since this demo clearly has nothing to do specifically with a mouse-related device - there are other demos for that.

This is what the demo description declares:

The USB HID generic application is a simple demonstration program based on the MCUXpresso SDK. It is enumerated as a HID-compliant device. A PC application can be used to exchange data with the device.

If I am using this demo for sending/receiving data from a device which is not a mouse, why would it "get the HID mouse class handle"?

Labels (2)
0 Kudos
Reply
3 Replies

982 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

HI crabbo_babbo

What's your chip part number? 

Please let me know, thus I will check.

Thanks,

Jun Zhang

0 Kudos
Reply

975 Views
crabbo_babbo
Contributor II

Hello, this is a LPC55S69-EVK

 

Have a good day

0 Kudos
Reply

969 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi

Get HID handler (g_UsbDeviceHidGeneric.hidHandle ) is important here. 

But I agree with you that the comment may confuse people.

I will suggest it to SDK team.

 

Thanks,

Jun Zhang

 

0 Kudos
Reply