LinuxÉ豸ģÐÍÖ®input×ÓϵͳÏê½â
Ò»£ºÇ°ÑÔ
×î½üÔÚÑо¿androidµÄsensor driver£¬Ö÷ÒªÊÇE-compass£¬ÆäÖÐÓõ½ÁËLinux input×Óϵͳ.ÔÚÍøÉÏÒ²¿´Á˺ܶàÕâ·½ÃæµÄ×ÊÁÏ£¬¸Ð¾õ»¹ÊÇÕâƪ·ÖÎöµÄ±È½ÏϸÖÂ͸³¹£¬Òò´ËתÔØÒ»ÏÂÒÔ±ã×Ô¼ºÑ§Ï°£¬Í¬Ê±ºÍ´ó¼Ò·ÖÏí£¡
£¨Õâƪ²©¿ÍÖ÷ÒªÊÇÒÔ¼üÅÌÇý¶¯ÎªÀýµÄ£¬²»¹ý½²½âµÄÊÇLinux Input Subsystem£¬¿ÉÒÔ×ÐϸµÄÑо¿Ò»Ï£¡£©
¼üÅÌÇý¶¯½«¼ì²âµ½µÄËùÓа´¼ü¶¼Éϱ¨¸øÁËinput×Óϵͳ¡£Input×ÓϵͳÊÇËùÓÐI/OÉ豸Çý¶¯µÄÖмä²ã£¬ÎªÉϲãÌṩÁËÒ»¸öͳһµÄ½çÃæ¡£ÀýÈ磬ÔÚÖÕ¶ËϵͳÖУ¬ÎÒÃDz»ÐèҪȥ¹ÜÓжàÉÙ¸ö¼üÅÌ£¬¶àÉÙ¸öÊó±ê¡£ËüÖ»Òª´Óinput×ÓϵͳÖÐȥȡ¶ÔÓ¦µÄʼþ(°´¼ü£¬Êó±êÒÆλµÈ)¾Í¿ÉÒÔÁË¡£
¶þ£ºÊ¹ÓÃinput deviceµÄÀý×Ó
ÏÂÃæµÄ´úÂëÊÇ»ùÓÚlinux kernel 2.6.25.·ÖÎöµÄ´úÂëÖ÷ҪλÓÚkernel2.6.25/drivers/inputÏÂÃæ.
ÔÚÄÚºË×Ô´øµÄÎĵµDocumentation/input/input-programming.txtÖС£ÓÐÒ»¸öʹÓÃinput×ÓϵͳµÄÀý×Ó£¬²¢¸½´øÏàÓ¦µÄ˵Ã÷¡£ÒÔ´ËΪÀý·ÖÎöÈçÏ£º
#include <linux/input.h>
#include <linux/module.h>
#include <linux/init.h>
#include <asm/irq.h>
#include <asm/io.h>
static void button_interrupt(int irq, void *dummy, struct pt_regs *fp)
{
input_report_key(&button_dev, BTN_1, inb(BUTTON_PORT) & 1);
input_sync(&button_dev);
}
static int __init button_init(void)
{
if (request_irq(BUTTON_IRQ, button_interrupt, 0, "button", NULL)) {
printk(KERN_ERR "button.c: Can't allocate irq %d\n", button_irq);
return -EBUSY;
}
button_dev.evbit[0] = BIT(EV_KEY);
button_dev.keybit[LONG(BTN_0)] = BIT(BTN_0);
input_register_device(&button_dev);
}
static void __exit button_exit(void)
{
&n
Ïà¹ØÎĵµ£º
¼¶±ð£º ³õ¼¶ ÍõÓ (yongwang@buaa.edu.cn), ±±¾©º½¿Õº½Ìì´óѧ¼ÆËã»úѧԺϵͳÈí¼þʵÑéÊÒ 2003 Äê 8 Ô 10 ÈÕ ³ÌÐòµÄÁ´½ÓºÍ×°Èë´æÔÚ×ŶàÖÖ·½·¨£¬¶øÈç½ñ×îΪÁ÷Ðеĵ±Êô¶¯Ì¬Á´½Ó¡¢¶¯Ì¬×°Èë·½·¨¡£±¾ÎÄÊ×ÏȻعËÁËÁ´½ÓÆ÷ºÍ×°ÈëÆ÷µÄ»ù±¾¹¤×÷ÔÀí¼°ÕâÒ»¼¼ÊõµÄ·¢Õ¹ÀúÊ·£¬È»ºóͨ¹ýʵ¼ÊµÄÀý×ÓÆÊÎöÁËLinuxϵͳ϶¯Ì¬Á´½ÓµÄÊµÏ ......
linux ´ò°üÃüÁîtar£º
tar cvf my.tar file1 // µ¥¸öÎļþ
tar cvf my.tar file1 file2 .. // ¶à¸öÎļþ
tar cvf my.tar dir1 // µ¥¸öĿ¼
tar cvf my.tar dir1 dir2 .. // ¶à¸öĿ¼
ÒÔÉϽö´ò°ü²¢ÎÞѹËõ¡£
²ÎÊý£º
-c £º½¨Á¢Ò»¸öѹËõÎļþµÄ²ÎÊýÖ¸Áî(create µÄÒâ˼)£»
-x £º½â¿ªÒ»¸öѹËõÎļþµÄ²ÎÊýÖ¸Á
- ......
LinuxÖвéÕÒÎļþµÄÃüÁîͨ³£Îª“find”ÃüÁ“find”ÃüÁîÄÜ°ïÖúÎÒÃÇÔÚʹÓÃ, ¹ÜÀíLinuxµÄÈÕ³£ÊÂÎñÖз½±ãµÄ²éÕÒ³öÎÒÃÇÐèÒªµÄÎļþ¡£¶ÔÓÚLinuxÐÂÊÖÀ´Ëµ£¬“find” ÃüÁîÒ²ÊÇÁ˽âºÍѧϰLinuxÎļþÌصãµÄ·½·¨¡£ÒòΪLinux·¢Ðа汾·±¶à£¬°æ±¾Éý¼¶ºÜ¿ì£¬ ÔÚLinuxÊé¼®ÉÏÍùÍùдÃ÷ij¸öÅäÖÃÎļþµÄËùÔÚλÖ㬠......
Óõ½µÄÈí¼þ£º httpd-2.0.52.tar.gz£¬apr-util-1.2.12£¬apr-1.2.2 £¬jakarta-tomcat-5.0.28 £¬libtool-1.5.6.tar.gz£¬
²Î¿¼×ÊÁÏ£ºhttp://www.chinaunix.net/jh/13/433971.html£¬
ÏÈ°²×°ºÃapacheºÍtomcat£¬ÔÚä¯ÀÀÆ÷ÀïÃæ·ÃÎʳɹ¦ÔÙ½øÐÐÏÂÒ»²½¡£
Ê×ÏÈÕûºÏtomcat+apache
Ê×ÏÈ°´ÕÕÍøÉÏ×ÊÁϽéÉܵÄÒ»² ......
wallÃüÁî
Õâ¸öÃüÁîµÄ¹¦ÄÜÊǶÔÈ«²¿ÒѵǼµÄÓû§·¢ËÍÐÅÏ¢£¬Óû§¿ÉÒÔÏÈ°ÑÒª·¢Ë͵ÄÐÅϢдºÃ´æÈëÒ»¸öÎļþÖУ¬È»ºóÊäÈ룺
# wall < ÎļþÃû
ÕâÑù¾ÍÄܶÔËùÓеÄÓû§·¢ËÍÐÅÏ¢ÁË¡£
ÔÚÉÏÃæµÄÀý×ÓÖзûºÅ“<”±íʾÊäÈëÖض¨Ïò£¬ÓйØËüµÄº¬ÒåºÍÓ÷¨Çë²ÎÔĵÚʮյÄÓйØÄÚÈÝ¡£ ÀýÈ磺
# wall ‘Thank you!&rsquo ......