hid复合设备收发示例

上传者: sala_man | 上传时间: 2022-05-11 11:51:11 | 文件大小: 8.01MB | 文件类型: ZIP
基于hidapi库开发USB收发应用,由于之前一直困惑于USB复合设备的使用,使用这个库之后大大简化USB设备操作,首先通过VID&PID枚举当前设备信息,若设备集成多个功能需要使用USAGE区分,并获取对应的PATH,然后使用PATH打开设备,对于单功能设备可直接使用VID&PID打开,发送需注意,第一个字节为节点,如发送64字节,需要1个字节节点+64字节,接收可使用阻塞或非阻塞模式,默认为阻塞模式(可设置),还可以调用指定超时接收,个人觉得非常好用,所以给需要的同行分享下。

文件下载

资源详情

[{"title":"( 43 个子文件 8.01MB ) hid复合设备收发示例","children":[{"title":"hid_test","children":[{"title":"Debug","children":[{"title":"hid_test.pdb <span style='color:#111;'> 19.00KB </span>","children":null,"spread":false}],"spread":true},{"title":"ipch","children":[{"title":"hid_test-e1861a2f","children":[{"title":"hid_test-5eda93be.ipch <span style='color:#111;'> 2.25MB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"hid_test.sln <span style='color:#111;'> 1.22KB </span>","children":null,"spread":false},{"title":"x64","children":[{"title":"Debug","children":null,"spread":false}],"spread":true},{"title":"hid_test.sdf <span style='color:#111;'> 24.08MB </span>","children":null,"spread":false},{"title":"hid_test.suo <span style='color:#111;'> 23.00KB </span>","children":null,"spread":false},{"title":"hid_test","children":[{"title":"Debug","children":[{"title":"cl.command.1.tlog <span style='color:#111;'> 1.35KB </span>","children":null,"spread":false},{"title":"rc.command.1.tlog <span style='color:#111;'> 490B </span>","children":null,"spread":false},{"title":"CL.read.1.tlog <span style='color:#111;'> 2.58KB </span>","children":null,"spread":false},{"title":"vc100.idb <span style='color:#111;'> 67.00KB </span>","children":null,"spread":false},{"title":"hid_test_manifest.rc <span style='color:#111;'> 206B </span>","children":null,"spread":false},{"title":"hid_test.Build.CppClean.log <span style='color:#111;'> 1.25KB </span>","children":null,"spread":false},{"title":"link-cvtres.read.1.tlog <span style='color:#111;'> 2B </span>","children":null,"spread":false},{"title":"link.read.1.tlog <span style='color:#111;'> 2B </span>","children":null,"spread":false},{"title":"rc.read.1.tlog <span style='color:#111;'> 246B </span>","children":null,"spread":false},{"title":"hid_test.exe.embed.manifest.res <span style='color:#111;'> 68B </span>","children":null,"spread":false},{"title":"link.write.1.tlog <span style='color:#111;'> 2B </span>","children":null,"spread":false},{"title":"CL.write.1.tlog <span style='color:#111;'> 648B </span>","children":null,"spread":false},{"title":"hid_test.log <span style='color:#111;'> 3.42KB </span>","children":null,"spread":false},{"title":"vc100.pdb <span style='color:#111;'> 124.00KB </span>","children":null,"spread":false},{"title":"hid_test.lastbuildstate <span style='color:#111;'> 47B </span>","children":null,"spread":false},{"title":"hid_test.exe.intermediate.manifest <span style='color:#111;'> 381B </span>","children":null,"spread":false},{"title":"link.command.1.tlog <span style='color:#111;'> 2B </span>","children":null,"spread":false},{"title":"hid_test.obj <span style='color:#111;'> 6.15KB </span>","children":null,"spread":false},{"title":"hid_test.exe.embed.manifest <span style='color:#111;'> 2B </span>","children":null,"spread":false},{"title":"hid_test.pch <span style='color:#111;'> 1.13MB </span>","children":null,"spread":false},{"title":"stdafx.obj <span style='color:#111;'> 11.55KB </span>","children":null,"spread":false},{"title":"hid_test.unsuccessfulbuild <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"hid_test.write.1.tlog <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"rc.write.1.tlog <span style='color:#111;'> 254B </span>","children":null,"spread":false},{"title":"link-cvtres.write.1.tlog <span style='color:#111;'> 2B </span>","children":null,"spread":false}],"spread":false},{"title":"hidapi.lib <span style='color:#111;'> 5.65KB </span>","children":null,"spread":false},{"title":"hidapi.h <span style='color:#111;'> 16.62KB </span>","children":null,"spread":false},{"title":"hid_test.cpp <span style='color:#111;'> 3.16KB </span>","children":null,"spread":false},{"title":"hid_test.vcxproj <span style='color:#111;'> 7.44KB </span>","children":null,"spread":false},{"title":"stdafx.h <span style='color:#111;'> 233B </span>","children":null,"spread":false},{"title":"hid_test.vcxproj.user <span style='color:#111;'> 143B </span>","children":null,"spread":false},{"title":"ReadMe.txt <span style='color:#111;'> 1.52KB </span>","children":null,"spread":false},{"title":"x64","children":[{"title":"Debug","children":[{"title":"hid_test.Build.CppClean.log <span style='color:#111;'> 1.85KB </span>","children":null,"spread":false},{"title":"hid_test.log <span style='color:#111;'> 404B </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"stdafx.cpp <span style='color:#111;'> 213B </span>","children":null,"spread":false},{"title":"hid_test.vcxproj.filters <span style='color:#111;'> 1.28KB </span>","children":null,"spread":false},{"title":"targetver.h <span style='color:#111;'> 236B </span>","children":null,"spread":false},{"title":"hidapi.dll <span style='color:#111;'> 93.50KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明