modify lpcxpresso55s16 hid mouse + keyboard example, but it continue to send keyboard packet

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

modify lpcxpresso55s16 hid mouse + keyboard example, but it continue to send keyboard packet

跳至解决方案
657 次查看
felix1
Contributor IV

Hi, 

based on example lpcxpresso55s16_dev_composite_hid_mouse_hid_keyboard_freertos, I modify it to as HID keyboard + HID generic.

When I got keyscan, I use 

 

USB_DeviceHidSend(s_UsbDeviceComposite->hidKeyboardHandle, USB_HID_KEYBOARD_ENDPOINT_IN, s_UsbDeviceHidKeyboard.buffer, USB_HID_KEYBOARD_REPORT_LENGTH);

 

to send key packet, but it continue to send key packet and won't stop.

For example, keyscan got 'b', and use USB_DeviceHidSend() to send HID packet,

but the PC continue to receive 'bbbbbbbb' for thousand times.

felix1_0-1695375633822.png

felix1_2-1695375715855.png

 

device[59] send 'b' report packet once, but device[61] continue to send.

felix1_3-1695375955850.png

 

I have commented the USB_DeviceHidKeyboardAction() in  function USB_DeviceHidKeyboardCallback().


 

 

 

 

标签 (2)
0 项奖励
1 解答
533 次查看
felix1
Contributor IV
I know the answer now, need to release the key.

在原帖中查看解决方案

0 项奖励
3 回复数
608 次查看
felix1
Contributor IV

Hi,

I check the origin example lpcxpresso55s16_dev_composite_hid_mouse_hid_keyboard_freertos again,

it send HID packet 'a' just once. (I modify to send 'a' than pageup)

felix1_0-1695634394247.png

felix1_1-1695634412464.png

Why my code repeat to send HID packet? Anyone can guide me the direction to trace?

 

 

0 项奖励
572 次查看
felix1
Contributor IV

Hi NXP,

I attached the project files that can reproduce the issue.

with a little modification.

1. change full speed to high speed
2. comment mouse rectangle action
3. call USB_DeviceHidSend() in USB_DeviceHidMouseCallback() once

SDK 2.14.0

 

0 项奖励
534 次查看
felix1
Contributor IV
I know the answer now, need to release the key.
0 项奖励