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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

1,394 次查看
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"?

标签 (2)
0 项奖励
回复
3 回复数

1,374 次查看
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 项奖励
回复

1,367 次查看
crabbo_babbo
Contributor II

Hello, this is a LPC55S69-EVK

 

Have a good day

0 项奖励
回复

1,361 次查看
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 项奖励
回复