Linux的Input Device
Linux 的 Input Device 是重要的一個 subsystem,在進行實例介紹前,先大略了解一下相關的 API。input.c是Linux的输入驅動程式,主要支援鍵盤與滑鼠的輸入;input.c介面特殊的地方是採用了事件(event)的方式來處理輸入,以下是input.c介面重要的資料結構與函數:
* struct input_dev
* void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value)
* void input_register_device(struct input_dev *);
* void input_unregister_device(struct input_dev *);
* void input_register_handler(struct input_handler *);
* void input_unregister_handler(struct input_handler *);
(1) struct input_dev是用來描述輸入事件的重要資料結構,其原型如下:
struct input_dev {
const char *name;
const char *phys;
const char *uniq;
struct input_id id;
unsigned long evbit[BITS_TO_LONGS(EV_CNT)];
unsigned long keybit[BITS_TO_LONGS(KEY_CNT)];
unsigned long relbit[BITS_TO_LONGS(REL_CNT)];
unsigned long absbit[BITS_TO_LONGS(ABS_CNT)];
unsigned long mscbit[BITS_TO_LONGS(MSC_CNT)];
unsigned long ledbit[BITS_TO_LONGS(LED_CNT)];
unsigned long sndbit[BITS_TO_LONGS(SND_CNT)];
unsigned long ffbit[BITS_TO_LONGS(FF_CNT)];
unsigned long swbit[BITS_TO_LONGS(SW_CNT)];
unsigned int keycodemax;
unsigned int keycodesize;
void *keycode;
int (*setkeycode)(struct input_dev *dev, int scancode, int keycode);
int (*getkeycode)(struct input_dev *dev, int scancode, int *keycode);
struct ff_device *ff;
unsigned int repeat_key;
struct timer_list timer;
int sync;
int abs[ABS_MAX + 1];
int rep[REP_MAX + 1];
unsigned long key[BITS_TO_LONGS(KEY_CNT)];
unsigned long led[BITS_TO_LONGS(LED_CNT)];
unsigned long snd[BITS_TO_LONGS(SND_CNT)];
unsign
相关文档:
UNIX是历史最悠久的通用操作系统。1969年,美国贝尔实验室的K.Thompson和D.M.Ritchie在规模较小及较简单的分时操作系统MULTICS的基础上开发出UNIX, 当时是在DEC的PDP—7小型计算机上实现的,1970年正式投入运行。此后数年,UNIX一直是一个限于在AT&T内部使用的操作系统。1971年,发展出以 PDP- ......
http://linux.chinaunix.net/bbs/archiver/tid-985372.html
Linux Kernel: 简介HZ, tick and jiffie
Linux[/b]核心幾個重要跟時間有關的名詞或變數,底下將介紹HZ[/b]、tick與jiffies。
......
ARM+LINUX路线,主攻嵌入式Linux操作系统及其上应用软件开发目标:
(1)掌握主流嵌入式微处理器的结构与原理(初步定为arm9)
(2)必须掌握一个嵌入式操作系统(初步定为uclinux或linux,版本待定)
(3)必须熟悉嵌入式软件开发流程并至少做一个嵌入式软件项目。
从事嵌入式软件开发的好处是 ......
一直以来我的文章都是以工作笔记的形式存在。这对于自己读起来没什么大碍,但是对于其他读者可能就有些迷茫。我尽量改改,换种方式。
1. MySQL 的版本
如果要支持分区表,则应该使用 5.1.x 以上的版本。如
mysql> show variables like '%version%';
+-------------------------+------------------------------ ......
本次安装的系统平台为redhat 5
一、使用RPM包进行安装
首先可以从安装光盘中或者到mysql的网站上下载对应版本的rpm包如下:
MySQL-server-community-5.1.38-0.rhel5.i386.rpm
MySQL-client-community-5.1.38-0.rhel5.i386.rpm
接着我们可以使用rpm命令进行安装:
rpm -ivh MySQL ......