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

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

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

Jump to solution
639 Views
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().


 

 

 

 

Labels (2)
0 Kudos
1 Solution
515 Views
felix1
Contributor IV
I know the answer now, need to release the key.

View solution in original post

0 Kudos
3 Replies
590 Views
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 Kudos
554 Views
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 Kudos
516 Views
felix1
Contributor IV
I know the answer now, need to release the key.
0 Kudos