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

ソリューションへジャンプ
1,658件の閲覧回数
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 解決策
1,534件の閲覧回数
felix1
Contributor IV
I know the answer now, need to release the key.

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
1,609件の閲覧回数
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 件の賞賛
返信
1,573件の閲覧回数
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 件の賞賛
返信
1,535件の閲覧回数
felix1
Contributor IV
I know the answer now, need to release the key.
0 件の賞賛
返信