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
Ïà¹ØÎĵµ£º
ÐÞ¸´Linuxϵͳ
1£®Ê¹Óü±¾ÈÅÌ×é½øÐÐά»¤
¼±¾ÈÅÌ×飨Ҳ³ÆΪboot/rootÅÌ×飩£¬ÊÇϵͳ¹ÜÀíÔ±±Ø²»¿ÉÉٵŤ¾ß¡£ÓÃËü¿ÉÒÔ¶ÀÁ¢µØÆô¶¯ºÍÔËÐÐÒ»¸öÍêÕûµÄLinuxϵͳ¡£Êµ¼Ê ÉÏ£¬¼±¾ÈÅÌ×éÖеĵÚ2ÕÅÅÌÉϾÍÓÐÒ»¸öÍêÕûµÄLinuxϵͳ£¬°üÀ¨rootÎļþϵͳ£»¶øµÚ1ÕÅÅÌÔò´æ·ÅÁË¿ÉÆô¶¯µÄÄںˡ£
ʹÓü±¾ÈÅÌ×éά»¤ÏµÍ³ºÜ¼òµ¥¡£Ö»ÐèÓÃÕâÁ½ÕÅÅÌÆô¶ ......
×÷ÕߣºSam£¨Õç·å£© sam_cdoe@hotmail.com
1.´´½¨thread.
int pthread_create(pthread_t *restrict thread, const pthread_attr_t *restrict attr,
void *(*start_routine)(void*), void *restrict arg);
²ÎÊý1£ºpthread_t *restrict t ......
1¡¢½«Îļþcheckoutµ½±¾µØĿ¼
svn checkout path£¨pathÊÇ·þÎñÆ÷ÉϵÄĿ¼£©
ÀýÈ磺svn checkout svn://192.168.1.1/pro/domain
¼òд£ºsvn co
2¡¢Íù°æ±¾¿âÖÐÌí¼ÓеÄÎļþ
svn add file
ÀýÈ磺svn add test.php(Ìí¼Ótest.php)
svn add *.php( ......
RHCEֱͨ³µ www.taobaofun.com Ìṩ×îÈ«ÃæµÄRHCE¿¼ÊÔ×ÊÁÏ
1£® ÕÆÎÕÖÁÉÙ50¸öÒÔÉϵij£ÓÃÃüÁî¡£
2£® ÊìϤGnomeKDEµÈX-windows×ÀÃæ»·¾³²Ù×÷£¬×îºÃÊÇ×Ô¼º°²×°ÏÂϵͳ£¬Ê¹ÓÃx»·¾³ÉÏÏÂÍø¡£
3£® ÕÆÎÕ.tgz¡¢.rpmµÈÈí¼þ°üµÄ³£Óð²×°·½·¨£¬±¸·Ý»¹Ôʱºò»áÓõ½µÄ
4£® Ñ§Ï°Ì ......
¡¡¡¡×î½ü×°¹ýµÄVista×°´íÁË£¬ÊǸöMSDN°æ£¬¸üйýºóÌáʾÎÒÒª¼¤»î¡£Ã»ÕÞ£¬Ö»ÄÜÖØ×°»»»ØÔÀ´µÄOEM
Ultimate°æ¡£Õâ¸öÖØ×°Ö®ºóµÄºó¹ûÎÒÊÇ¿¼ÂǹýµÄ£¬¾ÍÊÇGrubµÄ¶ªÊ§¡£¿ÉÎÒ²»Ïë¾ÍÕâôΪ´ËÖØÐÂ×°Ò»±éLinux¡£ÒªÖªµÀÎÒ¿ÉÊÇyumÁËÒ»Ìì²Å´Ó
Fedora7 yumµ½Fedora8µÄ£¬³¢ÊÔÒ»ÏÂÐÞ¸´Grub°É£¬¼¸Ìõ¼òµ¥µÄÃüÁî¾Í¸ã¶¨ÁË¡£
1¡¢·ÅÈëLinu ......