Linux»·¾³ÏÂUSBµÄÔÀí¡¢Çý¶¯ºÍÅäÖÃ
ʲôÊÇUSB£¿
USBÊÇÓ¢ÎÄUniversal Serial BusµÄËõд£¬ÒâΪͨÓô®ÐÐ×ÜÏß¡£USB×î³õÊÇΪÁËÌæ´úÐí¶à²»Í¬µÄµÍËÙ×ÜÏߣ¨°üÀ¨²¢ÐС¢´®ÐкͼüÅÌÁ¬½Ó£©¶øÉè¼ÆµÄ£¬ËüÒÔµ¥Ò»ÀàÐ͵Ä×ÜÏßÁ¬½Ó¸÷ÖÖ²»Í¬µÄÀàÐ͵ÄÉ豸¡£USBµÄ·¢Õ¹ÒѾ³¬Ô½ÁËÕâЩµÍËÙµÄÁ¬½Ó·½Ê½£¬ËüÏÖÔÚ¿ÉÒÔÖ§³Ö¼¸ºõËùÓпÉÒÔÁ¬½Óµ½PCÉϵÄÉ豸¡£×îеÄUSB¹æ·¶ÐÞ¶©ÁËÀíÂÛÉϸߴï480MbpsµÄ¸ßËÙÁ¬½Ó¡£LinuxÄÚºËÖ§³ÖÁ½ÖÖÖ÷ÒªÀàÐ͵ÄUSBÇý¶¯³ÌÐò£ºËÞÖ÷ϵͳÉϵÄÇý¶¯³ÌÐòºÍÉ豸ÉϵÄÇý¶¯³ÌÐò£¬´ÓËÞÖ÷µÄ¹ÛµãÀ´¿´£¨Ò»¸öÆÕͨµÄËÞÖ÷Ò²¾ÍÊÇÒ»¸öPC»ú£©£¬ËÞÖ÷ϵͳµÄUSBÉ豸Çý¶¯³ÌÐò¿ØÖƲåÈëÆäÖеÄUSBÉ豸£¬¶øUSBÉ豸µÄÇý¶¯³ÌÐò¿ØÖƸÃÉ豸ÈçºÎ×÷Ϊһ¸öUSBÉ豸ºÍÖ÷»úͨÐÅ¡£
USBµÄ¾ßÌå¹¹³É
ÔÚ¶¯ÊÖдUSBÇý¶¯³ÌÐòÕâÇ°£¬ÈÃÎÒÃÇÏÈ¿´¿´Ð´µÄUSBÇý¶¯³ÌÐòÔÚÄÚºËÖеĽṹ£¬ÈçÏÂͼ£º
USBÇý¶¯³ÌÐò´æÔÚÓÚ²»Í¬µÄÄÚºË×ÓϵͳºÍUSBÓ²¼þ¿ØÖÆÆ÷Ö®¼ä£¬USBºËÐÄΪUSBÇý¶¯³ÌÐòÌṩÁËÒ»¸öÓÃÓÚ·ÃÎʺͿØÖÆUSBÓ²¼þµÄ½Ó¿Ú£¬¶ø²»±Ø¿¼ÂÇϵͳµ±Ç°´æÔڵĸ÷ÖÖ²»Í¬ÀàÐ͵ÄUSBÓ²¼þ¿ØÖÆÆ÷¡£USBÊÇÒ»¸ö·Ç³£¸´ÔÓµÄÉ豸£¬linuxÄÚºËΪÎÒÃÇÌṩÁËÒ»¸ö³ÆΪUSBµÄºËÐĵÄ×ÓϵͳÀ´´¦Àí´ó²¿·ÖµÄ¸´ÔÓÐÔ£¬USBÉ豸°üÀ¨ÅäÖÃ(configuration)¡¢½Ó¿Ú£¨interface£©ºÍ¶Ëµã(endpoint)£¬USBÉ豸°ó¶¨µ½½Ó¿ÚÉÏ£¬¶ø²»ÊÇÕû¸öUSBÉ豸¡£ÈçÏÂͼËùʾ£º
USBͨÐÅ×î»ù±¾µÄÐÎʽÊÇͨ¹ý¶Ëµã£¨USB¶Ëµã·ÖÖжϡ¢ÅúÁ¿¡¢µÈʱ¡¢¿ØÖÆËÄÖÖ£¬Ã¿ÖÖÓÃ;²»Í¬£©£¬USB¶ËµãÖ»ÄÜÍùÒ»¸ö·½Ïò´«ËÍÊý¾Ý£¬´ÓÖ÷»úµ½É豸»òÕß´ÓÉ豸µ½Ö÷»ú£¬¶Ëµã¿ÉÒÔ¿´×÷Êǵ¥ÏòµÄ¹ÜµÀ£¨pipe£©¡£ËùÒÔÎÒÃÇ¿ÉÒÔÕâÑùÈÏΪ£ºÉ豸ͨ³£¾ßÓÐÒ»¸ö»òÕ߸ü¶àµÄÅäÖã¬ÅäÖþ³£¾ßÓÐÒ»¸ö»òÕ߸ü¶àµÄ½Ó¿Ú£¬½Ó¿Úͨ³£¾ßÓÐÒ»¸ö»òÕ߸ü¶àµÄÉèÖ㬽ӿÚûÓлò¾ßÓÐÒ»¸öÒÔÉϵĶ˵㡣Çý¶¯³ÌÐò°ÑÇý¶¯³ÌÐò¶ÔÏó×¢²áµ½USB×ÓϵͳÖУ¬ÉÔºóÔÙʹÓÃÖÆÔìÉ̺ÍÉ豸±êʶÀ´ÅжÏÊÇ·ñÒѾ°²×°ÁËÓ²¼þ¡£USBºËÐÄʹÓÃÒ»¸öÁÐ±í£¨ÊÇÒ»¸ö°üº¬ÖÆÔìÉÌIDºÍÉ豸ºÅIDµÄÒ»¸ö½á¹¹Ì壩À´Åж϶ÔÓÚÒ»¸öÉ豸¸ÃʹÓÃÄÄÒ»¸öÇý¶¯³ÌÐò£¬ÈȲ岦½Å±¾Ê¹ÓÃËüÀ´È·¶¨µ±Ò»¸öÌض¨µÄÉ豸²åÈ뵽ϵͳʱ¸Ã×Ô¶¯×°ÔØÄÄÒ»¸öÇý¶¯³ÌÐò¡£
ÉÏÃæÎÒÃǼòҪ˵Ã÷ÁËÇý¶¯³ÌÐòµÄ»ù±¾ÀíÂÛ£¬ÔÚдһ¸öÉ豸Çý¶¯³ÌÐò֮ǰ£¬ÎÒÃÇ»¹ÒªÁ˽âÒÔÏÂÁ½¸ö¸ÅÄģ¿éºÍÉ豸Îļþ¡£
Ä£¿é£ºÊÇÔÚÄں˿ռäÔËÐеijÌÐò£¬Êµ¼ÊÉÏÊÇÒ»ÖÖÄ¿±ê¶ÔÏóÎļþ£¬Ã»ÓÐÁ´½Ó£¬²»ÄܶÀÁ¢ÔËÐУ¬µ«ÊÇ¿ÉÒÔ×°Ôص½ÏµÍ³ÖÐ×÷ΪÄں˵ÄÒ»²¿·ÖÔËÐУ¬´Ó¶ø¿ÉÒÔ¶¯Ì¬À©³äÄں˵ŦÄÜ¡£Ä£¿é×îÖ÷ÒªµÄÓô¦¾ÍÊÇÓÃÀ´ÊµÏÖÉ豸Çý¶¯³ÌÐò¡£Linux϶ÔÓÚÒ»¸öÓ²¼þµÄÇý¶¯£¬¿ÉÒÔÓÐÁ½ÖÖ·½Ê½£ºÖ±½Ó¼ÓÔص½Äں˴úÂëÖУ¬Æô¶¯Ä
Ïà¹ØÎĵµ£º
Ê×Ïȼòµ¥µÄ½éÉÜÁ½Õߣº
¡¾linux²Ù×÷ϵͳ£º¼ò³ÆÃüÁ²Ù×÷ϵͳ¡¿
¼ò½é£º
¼òµ¥µØ˵£¬LinuxÊÇÒ»Ì×Ãâ·ÑʹÓúÍ×ÔÓÉ´«²¥µÄÀàUnix²Ù×÷ϵͳ£¬ËüÖ÷ÒªÓÃÓÚ»ùÓÚx86ϵÁÐCPUµÄ¼ÆËã»úÉÏ¡£Õâ¸öϵͳÊÇÓÉÊÀ½ç¸÷µØµÄ³ÉǧÉÏÍòµÄ³ÌÐòÔ±Éè¼ÆºÍʵÏֵġ£ÆäÄ¿µÄÊǽ¨Á¢²»ÊÜÈκÎÉÌÆ·»¯Èí¼þµÄ°æȨÖÆÔ¼µÄ¡¢È«ÊÀ½ç¶¼ÄÜ×ÔÓÉʹÓõÄUnix¼æÈݲúÆ·¡£
Ìص㣺 ......
http://www.ixpub.net/619016.html
tarÃüÁî
[root@linux ~]# tar [-cxtzjvfpPN] Îļþ
ÓëĿ¼ ....
²ÎÊý£º
-c £º½¨Á¢Ò»¸öѹËõÎļþµÄ²ÎÊýÖ¸Áî(create µÄÒâ˼)£»
-x £º½â¿ªÒ»¸öѹËõÎļþµÄ²ÎÊýÖ¸Á
-t £º²é¿´ tarfile ÀïÃæµÄÎļþ£¡
Ìرð×¢Ò⣬ÔÚ²ÎÊýµÄÏ´ïÖУ¬ c/x/t ½öÄÜ´æÔÚÒ»¸ö£¡²»¿Éͬʱ´æÔÚ£¡
ÒòΪ²»¿ÉÄÜÍ¬Ê ......
˵Ã÷£º±¾ÎÄÒÔÖ÷ҪΪתÔØÄÚÈÝ£¬Í¬Ê±¼ÓÈëÁËÎÒÔÚʹÓùý³ÌÖÐÓöµ½ÎÊÌâ¶ÔÆäµÄÐÞÕý£¡£¡£¡£¡£¡£¡£¡£¡£¡
ÏÈ˵statfs½á¹¹£º
#include <sys/vfs.h> /* »òÕß <sys/statfs.h> */
int statfs(const char *path, struct statfs *buf);
int fstatfs(int fd, struct statfs *buf);
²ÎÊý£º ......
Ëæ×ÅÓ²¼þ²»¶ÏµÄ·¢Õ¹£¬Î´À´µÄÖÇÄÜÊÖ»ú½«Ô½À´Ô½½Ó½üPCµÄÐÔÄÜ£¬Ò»¸öÇ¿´óµÄÊÖ»ú²Ù×÷ϵͳ½«ÊÇÍÚ¾ò²»¶Ï·ÉÔ¾µÄÊÖ»úÓ²¼þÐÔÄܵĹؼü£¬Ö»ÓÐÇ¿´óµÄ²Ù×÷ϵͳ²ÅÄÜÖ§³Ö¸÷ÖÖ²»¶Ï·¢Õ¹µÄÊÖ»úÓ¦Óã¬ÈçLinuxϵͳ¶ÔjavaµÄÍêÃÀÖ§³ÖÒÔ¼°ÓÅÔ½µÄ¶à½ø³Ìµ÷¶È£¬Ä¦ÍÐÂÞÀºÜÔç¾ÍÍƳö»ùÓÚLinuxϵͳµÄÊÖ»ú£¬Ëæ×ÅGoogleµÄAndroid²Ù×÷ϵͳµÄÍƳö£¬ÁíÒ»¸ö»ùÓÚL ......
The Linux USB input subsystem is a single, harmonized way to manage all input devices. This is a relatively new approach for Linux, with the system being partly incorporated in kernel version 2.4 and fully integrated in the 2.5 development series.
This article covers four basic areas: a descripti ......