Linux的USB编程 [英] Linux USB programming

查看:577
本文介绍了Linux的USB编程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来的Linux内核编程。我希望开发一个程序来读取像它的制造商名称,容量等我知道的描述及其属性的USB驱动器的信息。但我不明白如何枚举连接到系统的USB驱动器。我要寻找它启动内核和USB端口之间的连接功能。这怎么可能?

I am new to Linux kernel programming. I wish to develop a program to read USB drive information like its manufacturer name, capacity, etc. I know about descriptors and their attributes. But I don't understand how to enumerate USB drives connected to the system. I am looking for the function which initiates connection between kernel and USB port. How is it possible?

推荐答案

您不需要的内核程序, - 实际上读取设备信息,你甚至不需要一个设备驱动程序

You don't need to program the kernel as such - in fact to read the device info you don't even need a device driver.

USB系统是较新的2.6内核不同,所以很多在线教程可能是过时的 - 但这里开始的 http://www.linux-usb.org/

The USB system is different in the newer 2.6 kernels so a lot of the online tutorials may be out of date - but start here http://www.linux-usb.org/

如果你想编写一个USB设备驱动程序请参阅本 Linux杂志教程

If you do want to write a USB device driver see this Linux journal tutorial

这篇关于Linux的USB编程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆