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

LinuxÏÂUSBÉãÏñÍ·Çý¶¯¿ª·¢(ת)

 http://blog.csdn.net/youta_chen/archive/2007/08/29/1763215.aspx
½ñÄêÉÏ°ëÄêÎÒ¶ÔÊг¡³£¼ûµÄvimicro ÉãÏñÍ·ÒÆÖ²ÁËLinuxϵÄÇý¶¯ÖÁÔÚÑеÄÒ»¿îǶÈëʽ¿ª·¢°å£¬¿ª·¢»·¾³Îª£º
            OS:Linux2.6.9
Compile:cross 3.3.2
CPU:Intel PXA270
Camera Type :Vimicro ZC301P +HV7131R
ʹÓõÄÇý¶¯Ô´Âë»ùÓÚ×ÔÓÉÈí¼þspca5xx¡£»ùÓÚÔ´Âë×÷ÁËЩС¸Ä¶¯¡£¼Ç¼һÏ¡£
LinuxϵÄUSBÇý¶¯¼Ü¹¹
LinuxÏÂÍêÕûµÄUSBÇý¶¯³ÌÐò±ØÐë°üÀ¨3¸öÄ£¿é£ºUSB core£¬USB Ö÷¿ØÖÆÆ÷Çý¶¯£¬USBÉ豸Çý¶¯¡£ÈýÕߵĹØϵÈçÏ£º
ÆäÖУº
Linux Core·â×°ÁËÖ§³ÖUSBÖ÷¿ØÖÆÆ÷ºÍUSBÉ豸Çý¶¯µÄAPI£¬Í¨¹ýһϵÁеÄÊý¾Ý½á¹¹¡¢ºê¡¢º¯ÊýÀ´³éÏó»¯É豸Ӳ¼þ²¢ÑÚ±ÎÓ²¼þ¾ßÌåϸ½Ú£¬Ê¹µÃLinuxϵͳ¶ÔUSBÉ豸µÄ·ÃÎʲÉÓÃÈçͬһ°ãÎļþ·ÃÎÊÀàËƵĽӿں¯Êý£¬Èç´ËʵÏÖÁËÓ²¼þÎ޹ء£“É豸¼´ÊÇÎļþ”¡£
USB HC£¨Host Controller£©È«Ã渺ÔðÖ÷»ú¶Ë¶ÔUSBµÄÐÅÏ¢´«Êä·Ö¹¤£¬¶ÔÏÂ×¢²á¹¦ÄܺÍÏà¹ØÊý¾Ý½á¹¹£»¶ÔÉÏÌṩÁËÉ豸Çý¶¯ÓëUSB CoreÊý¾Ý´«ÊäµÄÇÅÁº¡£USBÉϵÄʵʱÁ÷Êý¾Ý´«Êäͨ³£Í¨¹ýURB£¨USB Request Block£©µÄÊý¾Ý½á¹¹ÊµÏÖ£¬Ã¿Ò»´ÎÊý¾Ý´«ÊäÖУ¬É豸Çý¶¯½¨Á¢URB£¬Ìá½»¸øUSB HC£¬USB HC¸ºÔðÍê³É´Ë´ÎÓëÉ豸¶ËµÄURB½»»¥¡£
USBÇý¶¯³ÌÐòµÄ½á¹¹
struct usb_driver spca5xx_driver
struct video_device spca50x_template
struct file_operations spca5xx_fops
Ä£¿é³õʼ»¯ÓëжÔØ
spca5xx_init()Ä£¿é³õʼ»¯£»spca5xx_disconnect()Ä£¿éжÔØ£»spca5xx_probe() ÎïÀíÉ豸²éÕÒ¡¢Æ¥Åä¡¢ÅäÖ㬲¢ÏòÄÚºË×¢²ávideoÉ豸¡£
ϵͳµ÷ÓýӿÚ
spca5xx_open()Íê³ÉÉ豸µÄ´ò¿ªºÍ³õʼ»¯£¬²¢³õʼ»¯½âÂëÆ÷Ä£¿é£¬spca5xx_close()Íê³ÉÉ豸µÄ¹Ø±Õ£»
spca5xx_read()Íê³ÉÊý¾ÝµÄ¶ÁÈ¡£¬ÆäÖ÷ÒªµÄ¹¤×÷¾ÍÊǽ«Êý¾ÝÓÉÄں˿ռ䴫Ë͵½½ø³ÌÓû§¿Õ¼ä£»
spca5xx_mmap()ʵÏÖ½«É豸ÄÚ´æÓ³Éäµ½Óû§½ø³ÌµÄµØÖ·¿Õ¼äµÄ¹¦ÄÜ£»
spca5xx_ioctl()ʵÏÖÎļþÐÅÏ¢µÄ»ñÈ¡¹¦ÄÜ¡£
Êý¾Ý´«Êä
spca50x_reg_write
ÉãÏñÍ·Êý¾Ý´«Êä¹ý³Ì
USB×ÜÏßÉÏÐÅÏ¢´«ÊäÀàÐͿɷֳɿØÖÆ¡¢Öжϡ¢µÈʱ¡¢³É¿éËÄÖÖ£ºÆäÖпØÖÆÐÍÖ÷ÒªÓÃÓÚÉ豸µÄ“ÅäÖÔÓë¿ØÖÆ£»ÖжÏÐÍÖ÷ÒªÓÃÓÚÖ÷»ú¶ÔUSBÉ豸µÄÖÜÆÚÐÔ²éѯ£»ÊµÊ±ÐÔʹÓÃÓëʵʱµÄÒôÊÓƵÐźŴ«Ê䣻³É¿éÐÍÓÃÓÚÐÅÏ¢Á¿´ó£¬Ã»ÓкÜÇ¿µÄʱ¼äÒªÇ󣬵«ÒªÇó¿É¿¿´«µÝµÄÓ¦Ó᣶ÔÉãÏñÍ·¶øÑÔ£¬Í¨³£²ÉÓõÄÊÇʵʱ´«Êä¡£USBÉ豸¶ËÌṩÈô¸ÉͨÐŶ˿ڣ¨port£©£¬Ö÷»úÓë¶Ë¿Ú¼ä½¨Á¢ÆðÂß¼­É


Ïà¹ØÎĵµ£º

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 fopenº¯Êý statº¯Êý

   1.
     ½ñÌìÉÏ°à×·Á˸öÎÊÌ⣬׷ÁË°ëÌì·¢ÏÖÊÇfopen´ò¿ª´óÓÚ2GµÄÎļþÓÐÎÊÌâ¡£
ÂíÉÏGoogleÏ£¬×ö¸ö±Ê¼Ç£º
  //   ¶¨Òåºê£¬Ê¹µÃ¿ÉÒÔ´¦Àí´óÎļþ£¨>4GB£©  
  #undef   _FILE_OFFSET_BITS  
  #define   _FILE_OFFSET_BITS   64 &nb ......

linuxϵÄapache+tomcatÕûºÏÕûÀí

 Óõ½µÄÈí¼þ£º 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
Ê×ÏÈ°´ÕÕÍøÉÏ×ÊÁϽéÉܵÄÒ»² ......

¹È¸èChrome OS³å»÷Linux×ÀÃæ

 




<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm }
-->

        ·¢Õ¹
Linux
µÄ×îÖÕÄ¿µÄÊÇ´ø¸øÈËÃÇÒ»¸öÍêÃÀµÄ×ÀÃ棨
Desktop
£©
,
ÓÃÓÚ¹¤×÷ºÍÓéÀÖ£¬ÆäÓàÊÂÇ鶼ÊǵڶþλµÄ¡£Õ⻰˵µÃÓеã¾ø¶Ô£¬µ«ÊÇ£¬ÏÖÔÚ²»µÃ²»Õâô˵¡£ÎªÊ²Ã´£¿
&n ......

LinuxÖÕÖ¹½ø³Ì

from: http://www.linuxeden.com/html/develop/20090702/66531.html
bashÅжϽø³Ì´æÔÚµÄ3ÖÖ·½·¨
1¡¢ps -p
ps -p ¸ù¾Ý¸ø¶¨µÄpid²ÎÊýÅжÏÊÇ·ñÓÐÕâ¸ö½ø³Ì¡£
Èç¹ûÓÐÕâ¸ö½ø³ÌÕý³£Í˳ö£¬Í˳öÖµ0£»
Èç¹ûûÓÐÕâ¸ö½ø³ÌÒì³£Í˳ö£¬Í˳öÖµ1¡£
apple@ubuntu:~$ ps -p 2442
  PID TTY         ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ