How to create two HID interfaces by using hid-generic sample codes

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to create two HID interfaces by using hid-generic sample codes

1,717件の閲覧回数
samchen_tw
Contributor III

Hi 

I want to create two HID interfaces and refer to hid-generic sample codes.

I have no idea how to do.

Could someone give me a hand.

Thanks.

Sam

ラベル(3)
0 件の賞賛
返信
3 返答(返信)

1,489件の閲覧回数
samchen_tw
Contributor III

I am following this composite device sample to create 2 hid interface.

LPCOpen-keil-lpc43xx/main.c at master · micromint/LPCOpen-keil-lpc43xx · GitHub 

Hope it works.

Thanks.

Sam

0 件の賞賛
返信

1,489件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi  Sam Chen,

How is going on about this issue?
Have a great day,
TIC

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信

1,489件の閲覧回数
samchen_tw
Contributor III

It works for me to invoke usb_hid_init twice with difffer interface description like this.

  ret = usb_hid_init(g_hUsb,
         (USB_INTERFACE_DESCRIPTOR *) &USB_FsConfigDescriptor[sizeof(USB_CONFIGURATION_DESCRIPTOR)],
         &usb_param.mem_base,
         &usb_param.mem_size);

  ret = usb_hid_btn_init(g_hUsb,
    &USB_FsConfigDescriptor[sizeof(USB_CONFIGURATION_DESCRIPTOR) + USB_INTERFACE_DESC_SIZE + HID_DESC_SIZE + 2*USB_ENDPOINT_DESC_SIZE ],
         &usb_param.mem_base,
         &usb_param.mem_size);

Thanks

Sam

0 件の賞賛
返信