Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Linux Input Device ½é紹: APIs


Linux Input Device ½é紹: APIs
jollen 發±íì¶ April 8, 2009 12:18 PM
Linux µÄ Input Device ÊÇÖØÒªµÄÒ»個 subsystem£¬ÔÚ進ÐÐ實Àý½é紹Ç°£¬ÏÈ´óÂÔÁ˽âÒ»ÏÂÏà關µÄ API¡£
Linux Input Device
input.cÊÇLinuxµÄ”input”驅動³Ìʽ£¬Ö÷ÒªÖ§Ô®鍵盤與»¬ÊóµÄ輸È룻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 *);
Linux µÄinput機ÖÆ¿ÉÓÃ來實×÷¡¸虛擬鍵盤¡¹»ò¡¸虛擬»¬Êó¡¹£¬Ö»Òªºô½Ðinput_event()將輸Èë資ÁÏ發佈給input handler¼´¿É¡£
struct input_devÊÇÓÃ來ÃèÊö輸ÈëʼþµÄÖØÒª資ÁÏ結構£¬ÆäÔ­ÐÍÐû¸æÈçÏ£º
struct input_dev {
void *private;
int number;
char *name;
unsigned short idbus;
unsigned short idvendor;
unsigned short idproduct;
unsigned short idversion;
unsigned long evbit[NBITS(EV_MAX)];
unsigned long keybit[NBITS(KEY_MAX)];
unsigned long relbit[NBITS(REL_MAX)];
unsigned long absbit[NBITS(ABS_MAX)];
unsigned long mscbit[NBITS(MSC_MAX)];
unsigned long ledbit[NBITS(LED_MAX)];
unsigned long sndbit[NBITS(SND_MAX)];
unsigned long ffbit[NBITS(FF_MAX)];
int ff_effects_max;
unsigned int keycodemax;
unsigned int keycodesize;
void *keycode;
unsigned int repeat_key;
struct timer_list timer;
int abs[ABS_MAX + 1];
int rep[REP_MAX + 1];
unsigned long key[NBITS(KEY_MAX)];
unsigned long led[NBITS(LED_MAX)];
unsigned long snd[NBITS(SND_MAX)];
int absmax[ABS_MAX + 1];
int absmin[ABS_MAX + 1];
int absfuzz[ABS_MAX + 1];
int absflat[ABS_MAX +


Ïà¹ØÎĵµ£º

LinuxÄÚºËͬ²½

ÔÚLinuxÄÚºËÀïÄÚ´æ¿ÉÒÔºÍÓ²ÅÌ¿Õ¼äͨÓõģ¬µ±ÄÚ´æÀûÓúÜÉÙʱ£¬Êý¾Ý¿ÉÒÔ´æµ½ÄÚ´æÀ·´Ö®Ó²ÅÌ¿Õ¼ä¿ÉÒÔÓÃÀ´µ±ÄÚ´æÓõ«ÊÇÓиö¹²Í¬µãÊý¾Ý×ÜÊÇÏÖÔÚÄÚ´æÀï²Ù×÷ÔÙд»Øµ½Ó²ÅÌÉϵġ£ÓÉÓÚÕâ¸öÔ­Òò£¬¿é´æ´¢É豸±»µ±³Éºó±¸´æ´¢Æ÷¡£
LinuxÌṩÁËÁ½ÖÖ²Ù×÷µÄ·½·¨£º
1 ºǫ́½ø³Ì²»Í£µÄ¼ì²éϵͳÄÚ´æÖÜÆÚÐÔµÄд²Ù×÷
2 µ±ÏµÍ³ÓÐÌ«¶àµÄÔàÒ³ÐèÒª ......

linux vs windows

Ê×Ïȼòµ¥µÄ½éÉÜÁ½Õߣº
¡¾linux²Ù×÷ϵͳ£º¼ò³ÆÃüÁ²Ù×÷ϵͳ¡¿
¼ò½é£º
¼òµ¥µØ˵£¬LinuxÊÇÒ»Ì×Ãâ·ÑʹÓúÍ×ÔÓÉ´«²¥µÄÀàUnix²Ù×÷ϵͳ£¬ËüÖ÷ÒªÓÃÓÚ»ùÓÚx86ϵÁÐCPUµÄ¼ÆËã»úÉÏ¡£Õâ¸öϵͳÊÇÓÉÊÀ½ç¸÷µØµÄ³ÉǧÉÏÍòµÄ³ÌÐòÔ±Éè¼ÆºÍʵÏֵġ£ÆäÄ¿µÄÊǽ¨Á¢²»ÊÜÈκÎÉÌÆ·»¯Èí¼þµÄ°æȨÖÆÔ¼µÄ¡¢È«ÊÀ½ç¶¼ÄÜ×ÔÓÉʹÓõÄUnix¼æÈݲúÆ·¡£
Ìص㣺 ......

linuxÏÂmmapµÄʹÓÃ

http://blog.csdn.net/adcxf/archive/2009/03/14/3989725.aspx
¹² ÏíÄÚ´æ¿ÉÒÔ˵ÊÇ×îÓÐÓõĽø³Ì¼äͨÐÅ·½Ê½£¬Ò²ÊÇ×î¿ìµÄIPCÐÎʽ¡£Á½¸ö²»Í¬½ø³ÌA¡¢B¹²ÏíÄÚ´æµÄÒâ˼ÊÇ£¬Í¬Ò»¿éÎïÀíÄÚ´æ±»Ó³Éäµ½½ø³ÌA¡¢B¸÷×ԵĽø³ÌµØÖ·¿Õ ¼ä¡£½ø³ÌA¿ÉÒÔ¼´Ê±¿´µ½½ø³ÌB¶Ô¹²ÏíÄÚ´æÖÐÊý¾ÝµÄ¸üУ¬·´Ö®ÒàÈ»¡£ÓÉÓÚ¶à¸ö½ø³Ì¹²Ïíͬһ¿éÄÚ´æÇøÓò£¬±ØÈ»ÐèÒ ......

Linux´ÓÔ´Âë°²×°subversionÓöµ½ÎÊÌâ¼°½â¾ö

LinuxÔ´Âë°²×°Subversion
ÏÈ´ÓsubversionµÄ¹Ù·½ÍøÕ¾ÏÂÔØÔ´Â룬subversion.apache.org
½âѹ¿ªµ½subversion-xxx È»ºóconfigure
È»ºóÒ»°ã¾ÍÊÇÕÒ²»µ½Ä³Ä³¿âµÄ´íÎó£¬ÒÔÏÂ˵Ã÷
1.ÕÒ²»µ½sqlite3
  ´ÓsqliteÍøÕ¾ÉÏÏÂÔØsqlite3µÄÔ´Â룬Ȼºó°Ñsqlite3.c¿½±´µ½ subversion-xxx/sqlite-amalgamation/sqlite3.c
2.ÕÒ²»µ½apr
......

LinuxÉ豸ģÐÍÖ®input×ÓϵͳÏê½â(¶þ)

;           break; 
         } 
  
         if (type != EV_SYN) 
            &nbs ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ