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

ʵÀý½âÎölinuxÄÚºËI2CÌåϵ½á¹¹

Ò»¡¢¸ÅÊö
̸µ½ÔÚlinuxϵͳϱàдI2CÇý¶¯£¬Ä¿Ç°Ö÷ÒªÓÐÁ½ÖÖ·½Ê½£¬Ò»ÖÖÊÇ°ÑI2CÉ豸µ±×÷Ò»¸ö
ÆÕͨµÄ×Ö·ûÉ豸À´´¦Àí£¬ÁíÒ»ÖÖÊÇÀûÓÃlinux I2CÇý¶¯Ìåϵ½á¹¹À´Íê³É¡£ÏÂÃæ±È½ÏÏÂÕâÁ½ÖÖÇý¶¯¡£
µÚÒ»ÖÖ·½·¨µÄºÃ´¦£¨¶ÔÓ¦µÚ¶þÖÖ·½·¨µÄÁÓÊÆ£©ÓУº
        ¡ñ    Ë¼Â·±È½ÏÖ±½Ó£¬²»ÐèÒª»¨Ê±¼äÈ¥Á˽âlinuxÄÚºËÖи´ÔÓµÄI2C×ÓϵͳµÄ²Ù×÷·½·¨¡£
µÚÒ»ÖÖ·½·¨ÎÊÌ⣨¶ÔÓ¦µÚ¶þÖÖ·½·¨µÄºÃ´¦£©ÓУº
        ¡ñ    ÒªÇ󹤳Ìʦ²»½öÒª¶ÔI2CÉ豸µÄ²Ù×÷ÊìϤ£¬¶øÇÒÒªÊìϤI2CµÄÊÊÅäÆ÷²Ù×÷£»

        ¡ñ    ÒªÇ󹤳Ìʦ¶ÔI2CµÄÉ豸Æ÷¼°I2CµÄÉ豸²Ù×÷·½·¨¶¼±È½ÏÊìϤ£¬×îÖØÒªµÄÊÇд³öµÄ³ÌÐò¿ÉÒÆÖ²ÐԲ

        ¡ñ    ¶ÔÄں˵Ä×ÊÔ´ÎÞ·¨Ö±½ÓʹÓá£ÒòΪÄÚºËÌṩµÄËùÓÐI2CÉ豸Æ÷¼°É豸Çý¶¯¶¼ÊÇ»ùÓÚI2C×ÓϵͳµÄ¸ñʽ¡£I2CÊÊÅäÆ÷µÄ²Ù×÷¼òµ¥»¹
ºÃ£¬Èç¹ûÓöµ½¸´ÔÓµÄI2CÊÊÅäÆ÷£¨È磺»ùÓÚPCIµÄI2CÊÊÅäÆ÷£©£¬¹¤×÷Á¿¾Í»á´óºÜ¶à¡£
±¾ÎÄÕë¶ÔµÄ¶ÔÏóÊÇÊìϤI2CЭÒ飬²¢ÇÒÏëʹÓÃlinuxÄÚºË×ÓϵͳµÄ¿ª·¢ÈËÔ±¡£
ÍøÂçºÍһЩÊé¼®ÉÏÓнéÉÜI2C×ÓϵͳµÄÔ´Âë½á¹¹¡£µ«·¢Ïֺܶ࿪·¢ÈËÔ±¿´ÁËÕâЩÎÄÕº󣬻¹ÊÇ
²»Çå³þ×Ô¼º¾¿¾¹¸Ã×öЩʲô¡£¾¿ÆäÔ­Òò»¹ÊÇûŪÇå³þI2C×ÓϵͳΪÎÒÃÇ×öÁËЩʲô£¬ÒÔ¼°ÎÒÃÇÔõÑùÀûÓÃI2C×Óϵͳ¡£±¾ÎÄÊ×ÏÈÒª½â¾öÊÇÈçºÎÀûÓÃÏÖÓÐÄÚºËÖ§³ÖµÄ
I2CÊÊÅäÆ÷£¬Íê³É¶ÔI2CÉ豸µÄ²Ù×÷£¬È»ºóÔÙ¹ý¶Èµ½ÊÊÅäÆ÷´úÂëµÄ±àд¡£±¾ÎÄÖ÷Òª´Ó½â¾öÎÊÌâµÄ½Ç¶Èȥд£¬²»»áÉæ¼°ÌرðÏêϸµÄ´úÂë¸ú×Ù¡£
¶þ¡¢I2CÉ豸Çý¶¯³ÌÐò±àд
Ê×ÏÈÒªÃ÷È·ÊÊÅäÆ÷Çý¶¯µÄ×÷ÓÃÊÇÈÃÎÒÃÇÄܹ»Í¨¹ýËü·¢³ö·ûºÏI2C±ê׼ЭÒéµÄʱÐò¡£
ÔÚLinuxÄÚºËÔ´´úÂëÖеÄdrivers/i2c/bussesĿ¼Ï°üº¬×ÅһЩÊÊÅäÆ÷
µÄÇý¶¯¡£ÈçS3C2410µÄÇý¶¯i2c-s3c2410.c¡£µ±ÊÊÅäÆ÷¼ÓÔص½Äں˺󣬽ÓÏÂÀ´µÄ¹¤×÷¾ÍÒªÕë¶Ô¾ßÌåµÄÉ豸±àдÉ豸Çý¶¯ÁË¡£
±àдI2CÉ豸Çý¶¯Ò²ÓÐÁ½ÖÖ·½·¨¡£Ò»ÖÖÊÇÀûÓÃϵͳ¸øÎÒÃÇÌṩµÄi2c-dev.cÀ´ÊµÏÖÒ»
¸öi2cÊÊÅäÆ÷µÄÉ豸Îļþ¡£È»ºóͨ¹ýÔÚÓ¦Óòã²Ù×÷i2cÊÊÅäÆ÷À´¿ØÖÆi2cÉ豸¡£ÁíÒ»ÖÖÊÇΪi2cÉ豸£¬¶ÀÁ¢±àдһ¸öÉ豸Çý¶¯¡£×¢Ò⣺ÔÚºóÒ»ÖÖÇé¿öÏ£¬ÊÇ
²»ÐèҪʹÓÃi2c-dev.cµÄ¡£
1¡¢ÀûÓÃi2c-dev.c²Ù×÷ÊÊÅäÆ÷£¬½ø¶ø¿ØÖÆi2cÉ豸
i2c-dev.c²¢Ã»Ó


Ïà¹ØÎĵµ£º

linuxÏÂcÓïÑÔÁ¬½ÓmysqlÊý¾Ý¿â

ÔÚFC8ÖÐĬÈÏ°²×°µÄÓÐmysql£¬Ã»ÓеĻ°¿ÉÒԺܷ½±ãµÄ°²×°Ï¡£
ĬÈϵÄmysqlµÄincludeÎļþĿ¼ÔÚ/usr/include/mysql
ĬÈϵÄmysqlµÄlibÎļþ¼ÐÔÚ/usr/lib/mysql
ÕâÁ½¸öĿ¼ÔÚÎÒÃDZàÒëʱºòÐèÒªµ½¡£
ÎҵIJâÊÔÓõÄC´úÂëΪ£º
££include <stdio.h>
#include <stdlib.h>
#include <mysql.h>
#define CONN_HOST ......

ÔÚlinux gcc 64λƽ̨±àÒ붯̬Á´½Ó¿âʱ³öÏÖµÄÎÊÌâ

ÔÚ32λƽ̨ÉϱàÒ붯̬¿âûÓÐɶÎÊÌ⣬Äõ½x86_64λƽ̨ÉϱàÒëʱ³öÏÖÁËÎÊÌâ¡£
relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
ÕÕ×ÅÌáʾ±àÒë´úÂëµÄʱºò¼ÓÈë -fPICÑ¡Ïî¾Íok.
......

spinlock ÓëlinuxÄں˵÷¶ÈµÄ¹Øϵ


¹ØÓÚ×ÔÐýËøÓ÷¨½éÉܵÄÎÄÕ£¬ÒѾ­Óкܶ࣬µ«ÓÐЩϸ½ÚµÄµØ·½µãµÄ»¹²»¹»Í¸¡£ÎÒÕâÀï¾Í°ÑÎÒ¸öÈËÈÏΪ´ó¼ÒÈÝÒ×ÓÐÒÉÎʵĵط½ÄóöÀ´ÌÖÂÛһϡ£

Ò»¡¢×ÔÐýËø£¨spinlock£©¼ò½é

×ÔÐýËøÔÚͬһʱ¿ÌÖ»Äܱ»×î¶àÒ»¸öÄÚºËÈÎÎñ³ÖÓУ¬ËùÒÔÒ»¸öʱ¿ÌÖ»ÓÐÒ»¸öÏß³ÌÔÊÐí´æÔÚÓÚÁÙ½çÇøÖС£Õâµã¿ÉÒÔÓ¦ÓÃÔڶദÀí»úÆ÷¡¢»òÔËÐÐÔÚµ¥´¦ÀíÆ÷ÉϵÄÇ ......

Linux iptables ¶Ë¿Ú Ó³Éä°¸Àý

iptablesÊÇÒ»¸ö
Linux
ÏÂÓÅÐãµÄnat+·À»ðǽ¹¤¾ß£¬ÎÒʹÓøù¤¾ßÒԽϵÍÅäÖõĴ«Í³pcÅäÖÃÁËÒ»¸ö
Áé»îÇ¿¾¢µÄ·À»ðǽ+natϵ
ͳ,СÓÐÐĵ㬿´
ÁËÍøÉÏÒ²ÓкܶàÕâ·½ÃæµÄÎÄÕ£¬µ«ÊÇËƺõҪô˵µÄ±È½ÏÉÙ£¬ÒªÃ´¾ÍÊDZȽÏÆ«£¬ÄÚÈݲ»È«£¬ÈÝÒ×Îóµ¼£¬ÎÒÑо¿ÁËÒ»¶Îʱ¼äµÄiptablesͬʱҲÓÃÁ˺ܾã¬ÓеãµÎ
¾­Ñ飬дÀ´¹©´ó¼Ò²Î¿¼£¬Í¬Ê±Ò²±¸ ......

Linux·¢Ðа汾½éÉÜ

1.Ubuntu
ËüµÄÒâ˼ÿһλGeekÓ¦¸Ã¶¼ÖªµÀ£¬ÕâÊÇÒ»¸ö¹Å·ÇÖÞÓïµ¥´Ê£¬´ú±í“ÈËÐÔ”»òÕß“ÎҵĴæÔÚÊÇÒòΪ´ó¼ÒµÄ´æÔÚ”¡£
2.PCLinuxOS
PC + Linux + Operating System£¬Óû§½çÃæºÜÏñWindows¡£
3.openSUSE
ÊÇNovellºÍAMD×ÊÖúµÄSUSEÉçÇøÏîÄ¿£¬SUSEÈ¡µÂÓïµ¥´ÊÊ××Öĸ“Software- und System-Entwicklun ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ