Microchip
直播中

望艳妮

8年用户 190经验值
私信 关注
[问答]

怎么将USB_HID_Keyboard_Basic示例代码与USB_HUB_MSD示例代码组合在一起

嗨,我想把键盘示例代码与集线器MSD示例代码合并。我的目标是有一个条形码阅读器,它可以很好地对键盘代码进行微调,并将读数保存到MSD。示例代码似乎没有模块化,这使我有点迷失。谢谢。

以上来自于百度翻译


      以下为原文

    Hi,

I'm looking to merge the keyboard example code, with the hub msd example code.

My goal is to have a barcode reader that is working fine with slight tweaks to the Keyboard code, and save the readings to a MSD.

The example code doesn't seem modular, which has left me a little lost.

Thanks.

回帖(3)

李兆峰

2019-3-5 09:42:19
我创建了一个“通用/HID”+“MSD”设备。你所要求的不应该是非常不同的,即使那些东西总是有点疼,我很确定我是从一些旧的微芯片应用程序库中的复合设备开始的,你检查过了吗?

以上来自于百度翻译


      以下为原文

    I created a "generic/HID" + "MSD" device. What you're asking should not be very different, even if those things are always a bit of a pain
 
I am pretty sure that I started from some Composite device available in the old Microchip Application Libraries, did you check them?
举报

张桂芝

2019-3-5 09:47:54
你好,谢谢你的回复。我已经看过了MLA,但是没有一个例子与PIC32 MZ兼容。我用条形码阅读器的和声例子,把它作为键盘。还有一个例子是CDC+MSD。这允许鼠标使用MSD,但没有键盘。我已经尝试提取键盘代码并将其插入到MSD代码的适当区域,但没有乐趣。

以上来自于百度翻译


      以下为原文

    Hi,
 
Thanks for your reply. I've had a look at the MLA's but none of the examples are compatible with a PIC32MZ.
 
I am using a Harmony example for the barcode reader, by using it as a keyboard.
 
There's another example that is for a CDC+MSD. This allows a mouse to work with an MSD, but no keyboard.
I've tried extracting the keyboard code and slotting it in to the appropriate areas of the MSD code, but to no joy.
 
 
举报

李兆峰

2019-3-5 09:59:01
我知道,嗯,是的,它们可能还没有准备好用于你的图片。但是从理论上讲,不太难去移植代码的相关部分:描述符;HID应该是相当琐碎的,然后MSD需要更多的关心。

以上来自于百度翻译


      以下为原文

    I see,
well yes they possibly are not ready to use for your PIC.
 
But in theory it's not too hard to port the relevant part of codes: Descriptors; HID should be quite trivial, and then the MSD that needs some more care...
举报

更多回帖

发帖
×
20
完善资料,
赚取积分