简体   繁体   English

使用c ++的USB端口

[英]Using USB port from c++

i was just wondering if somebody could give me any pointers about how to use USB ports on Ubuntu(and other unix systems) &&/|| 我只是想知道是否有人可以给我任何关于如何在Ubuntu(和其他unix系统)上使用USB端口的指示&& / || (and/or :]) windows. (和/或:])窗口。 I was trying to googling some stuff up but i failed horribly. 我试图谷歌搜索一些东西,但我失败了。 Even names of libraries to be used etc would be appriciated. 即使是要使用的图书馆名称也会受到限制。

Thanks, Tomas Herman 谢谢,托马斯赫尔曼

You can use libusb for direct access to USB. 您可以使用libusb直接访问USB。 http://www.libusb.org/ http://www.libusb.org/

If you instead wish to use a USB serial port or other device for which the OS already has drivers, look for other means. 如果您希望使用USB串行端口或操作系统已有驱动程序的其他设备,请寻找其他方法。 Eg /dev/input/event* or /dev/ttyUSB* devices on Linux. 例如Linux上的/ dev / input / event *或/ dev / ttyUSB *设备。

Two quick links for you: 两个快速链接:

http://www.linux-usb.org/ - The Linux USB project http://www.linux-usb.org/ - Linux USB项目

http://www.libusb.org/ - "...the libusb project. It aims to create a library for use by user level applications to access USB devices regardless of OS." http://www.libusb.org/ - “... libusb项目。它旨在创建一个供用户级应用程序使用的库,以便无论操作系统如何都能访问USB设备。”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM