The Linux USB Input Subsystem, Part I
The Linux USB input subsystem is a single, harmonized way to manage all input devices. This is a relatively new approach for Linux, with the system being partly incorporated in kernel version 2.4 and fully integrated in the 2.5 development series.
This article covers four basic areas: a description of what the input subsystem does, a short historical perspective on development, a description of how the input subsystem is implemented in the kernel and an overview of the user-space API for the input subsystem and how you can use it in your programs. The first three areas are discussed in this article. The user-space API, the final topic, will be discussed in Part II of this article.
What Is the Input Subsystem?
The input subsystem is the part of the Linux kernel that manages the various input devices (such as keyboards, mice, joysticks, tablets and a wide range of other devices) that a user uses to interact with the kernel, command line and graphical user interface. This subsystem is included in the kernel because these devices usually are accessed through special hardware interfaces (such as serial ports, PS/2 ports, Apple Desktop Bus and the Universal Serial Bus), which are protected and managed by the kernel. The kernel then exposes the user input in a consistent, device-independent way to user space through a range of defined APIs.
How We Got Here
The Linux input subsystem is primarily the work of Vojtech Pavlik, who saw the need for a flexible input system from his early work on joystick support for Linux and his later work on supporting USB. The first integration for the input subsystem replaced existing joystick and USB drivers in the 2.3 development kernel series. This support carried over to version 2.4, and input support in the 2.4 series is basically limited to joysticks and USB input devices.
The 2.5 development kernel series fully integrates the input subsystem. This tutorial is based on the full integration, which will be the input API for the 2.
相关文档:
首先简单的介绍两者:
【linux操作系统:简称命令浮操作系统】
简介:
简单地说,Linux是一套免费使用和自由传播的类Unix操作系统,它主要用于基于x86系列CPU的计算机上。这个系统是由世界各地的成千上万的程序员设计和实现的。其目的是建立不受任何商品化软件的版权制约的、全世界都能自由使用的Unix兼容产品。
特点: ......
一、本次内核编译新内核所涉及软件版本
“gcc –version”可查寻GCC版本------4.3.2 20081105(Red Hat 4.3.2-7)
“make –v”可查询 Gnu make版本-----3.81
“ld –V(v)可查询GNU ld版本-----2.18.50.0.9-7。f c10 20080822
“fdformat --version”命令 ......
将可移动设备连入系统时,系统的后台中会依次发生如下事件:
l 内核检测到新硬件插入,然后分别通知hotplug和udev。前者用来装入相应的内核模块(如usb-storage),而后者用来在/dev中创建相应的设备节点(如/dev/sda1)。
l udev创建了相应的设备节点之后,会将这一消息通知hal的守护程序(hald)。当然udev还得保证新 ......
虽然学过
Linux Shell
编程,但由于编写
Shell
脚本的机会实在是比较少
(
通常在项目初期搭建开发环境时编写得比较
多一些
)
,所以一
些语法久而久之就会忘了,一个简单的语法去翻书效率实在是慢,所以就个人整理了一个表格,由于我用的编程语言是
C/C++
,所以在编程的时候往往脑海里面首
先浮现的是用
C
......
ls -l|grep ^d ----列出当前目录下的文件夹
ls -l|grep ^d|grep "tmp" ----列出当前目录下明子含有"tmp"的文件夹
for dir in `ls -l ~/dxy/|grep ^d | awk '{print $9}'` ---- awk '{print $9}' ,只print 文件夹的名字
do
echo "==== $dir"
cd ~/dxy;cd $dir/
t=`ls -l|grep ^d|grep " ......