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£©£¬Ö÷»úÓë¶Ë¿Ú¼ä½¨Á¢ÆðÂß¼É
Ïà¹ØÎĵµ£º
ÀýÒ»£º·¢ËÍSignaling Packet£º
Signaling CommandÊÇ2¸öBluetoothʵÌåÖ®¼äµÄL2CAP²ãÃüÁî´«Êä¡£ËùÒÔµÃSignaling CommandʹÓÃCID 0x0001.
¶à¸öCommand¿ÉÒÔÔÚÒ»¸öC-frame£¨control frame£©Öз¢ËÍ¡£
Èç¹ûÒªÖ±½Ó·¢ËÍSignaling Command.ÐèÒª½¨Á¢SOCK_RAWÀàÐ͵ÄL2CAPÁ¬½ÓSocket¡£ÕâÑù²ÅÓлú»á×Ô¼ºÌî³äCommand Code£¬Identi ......
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( ......
×î½üÏÂÁËÒ»¸ölinux 0.1°æ±¾µÄÔ´´úÂ룬ÎļþÊÇrar¸ñʽ¡£
ÒÔÏÂÊÇÔÌûÄÚÈÝ£º
°²×°£º
Èç¹ûÊÇÒÔtarballÐÎʽ°²×°°²×°£¬È¥rarÍøÕ¾ÏÂÔØÏàÓ¦°æ±¾µÄtarball¡£µØַΪhttp://www.rarlab.com/
ÒÔ3.8°æ±¾ÎªÀý£¬Èç¹ûÊÇi386µÄƽ̨,Ö´ÐÐÒÔÏÂÃüÁî ......
Óõ½µÄÈí¼þ£º 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
Ê×ÏÈ°´ÕÕÍøÉÏ×ÊÁϽéÉܵÄÒ»² ......
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm }
-->
·¢Õ¹
Linux
µÄ×îÖÕÄ¿µÄÊÇ´ø¸øÈËÃÇÒ»¸öÍêÃÀµÄ×ÀÃ棨
Desktop
£©
,
ÓÃÓÚ¹¤×÷ºÍÓéÀÖ£¬ÆäÓàÊÂÇ鶼ÊǵڶþλµÄ¡£Õ⻰˵µÃÓеã¾ø¶Ô£¬µ«ÊÇ£¬ÏÖÔÚ²»µÃ²»Õâô˵¡£ÎªÊ²Ã´£¿
&n ......