如何通过USB端口使用C ++控制外部divices [英] How can I control extranal divices using C++ through an USB port
本文介绍了如何通过USB端口使用C ++控制外部divices的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想通过我的电脑控制小电路,所以我可以使用这些代码来改变电路的行为,但我觉得很难帮助我帮助我
我尝试了什么:
i已尝试并行端口,但我的计算机中没有并行端口
i wanted to control small circuits through my computer so i can use the codes to change the behavior of the circuit but i find it difficult pls help me out
What I have tried:
i have tried the parallel port but i dont have a parallel port in my computer
推荐答案
从你的问题我认为你需要一个用户模式应用程序,它应该通过USB读/写命令。(我想你不需要写一个驱动程序)。
如果你在Windows系统上使用WinUSB是一个很好的选择,试试,如何使用WinUSB函数(Windows驱动程序)访问USB设备 [ ^ ]链接应该可以帮助你开始。
基于Linux的系统libusb [ ^ ]是个不错的选择。
请记住,您发送到USB设备的命令必须由该目标设备处理。
From your question I think you will need a user mode application which should read/write commands through USB.(I guess you don't need to write a driver).
If you are on Windows System using WinUSB is a good option to try out, How to Access a USB Device by Using WinUSB Functions (Windows Drivers)[^] link should get you started.
On Linux based system libusb[^] is a good option.
Remember the commands you send to the USB device have to processed by that target device.
这篇关于如何通过USB端口使用C ++控制外部divices的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文