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

understanding linux usb ehci device driver£¨2£©

understanding linux usb ehci device driver£¨2£©
understanding linux usb ehci device driver(2)
lm_tom@163.com
2. linux ehci device driver(ehci hcd)
2.1. linux usb subsystem arch overview(host)
2.2. ehci_hcd
2.3. ehci ʵÏֵĽӿÚ
2.3.1. ehci_pci_setup() (hc_driver->reset)
2.3.2. ehci_run() (hc_driver->start)
2.3.3. ehci_stop() (hc_driver->stop)
2.3.4. ehci_get_frame()(hc_driver-> get_frame_number)
2.3.5. ehci_urb_enqueue()(hc_driver->urb_enqueue)*
2.3.6. ehci_urb_dequeue()(hc_driver->urb_dequeue)
2.3.7. ehci_endpoint_disable()(hc_driver-> endpoint_disable)
2.3.8. ehci_irq()(hc_driver->irq)*
2.3.9. ehci_hub_control()(hc_driver->hub_control)
2.3.10. ehci_hub_status_data(hc_driver->hub_status_data)


1.   linux ehci device driver(ehci hcd)
1.1.linux usb subsystem arch overview(host)
            
Fig 2-1 linux usb subsystem block diagram
Fig 2-1ÖÐ, ÂÌÉ«Ïß´ú±íµ÷ÓùØϵ,ÂÌÏßÆðµã(·Ç¼ýÍ·)Á¬½Ó·þÎñÌṩÕß,ÂÌÏßÖÕµã(¼ýÍ·)Ö¸Ïòµ÷Ó÷½; ºìÉ«Ïß´ú±íʵÏÖ¹Øϵ,
ºìÏßÖÕµã(¼ýÍ·)Ö¸Ïò½Ó¿Ú¶¨ÒåÕß,ºìÏßÆðµã(·Ç¼ýÍ·)Á¬½Ó½Ó¿ÚʵÏÖ·½.

Usb Interface driver Ö¸²Ù×÷usb functionµÄÇý¶¯,¸ºÔðʵÏÖfunction²ãµÄЭÒé(mass-storage,
usb video class,HID…),±ÈÈçusb-storage/uvc/hidµÈÄ£¿é,Ò»°ãÿ¸ö(Àà)InterfaceʹÓÃÒ»ÖÖÇý¶¯.
Óû§¿É×Ô¼º¿ª·¢Ò»Ð©±ê×¼classµÄÇý¶¯»òÕßһЩ·Ç±ê×¼µÄfunctionÇý¶¯,ϵͳÖÐÖ§³ÖfunctionµÄÊýÄ¿ÓÉusb 2.0
specÈ·¶¨,Ò»°ãÀ´Ëµ²»Í¬(Àà)µÄfunction¾ùÓÐÒ»¸ö¶ÔÓ¦µÄUsb Interface driver, usb
subsystem¿ÉÒÔͬʱ֧³Ö¶à¸öusb Interface driver(usb function)µÄÔËÐÐ. Ò»°ãÀ´Ëµ£¬¸Ã²ã±È½Ï±¡,
classµÄЭÒ鶼²»ÊǺܸ´ÔÓ.

Linux usbcoreÄ£¿éÊǶÔÕû¸ölinux usb subsytemµÄ³éÏó, ÔÚÕû¸ösubsystemÖÐÆð×ųÐÉÏÆôϵÄ×÷ÓÃ, ʵÏÖusb
2.0²¿·ÖЭÒé. ÌṩÁË´óÁ¿µÄAPI¹©Íⲿģ¿éµ÷ÓÃ, ÕâЩAPI ¶ÔÓ¦linux usbcore
moduleÖÐͨ¹ýEXPORT_SYMBOL()µ¼³öµÄº¯ÊýºÍ±äÁ¿; ͬʱ,linux usbcore Ò²¶¨ÒåÁ˽ӿÚÀàÐÍ, ÕâЩ½Ó¿ÚÐèÒªusb
interface driverÒÔ¼°usb host controller driverÀ´ÊµÏÖ. usbcoreÄ£¿éÒ»°ã²»ÐèÒªÓû§¸Ä¶¯.
¸Ã²ã±È½Ïºñ,ÄÚÈݽÏΪ·á¸».

Linux usb host


Ïà¹ØÎĵµ£º

LinuxÏÂMySQL5.1µÄ°²×°

×î½üÏëÔÚ·þÎñÆ÷ÉÏÊÔÊÔMySQL5.1µÄ·ÖÇø£¬ÓÚÊǾÍÏë×Å×°¸öMySQL5.1£¬¾­¹ýÍ´¿àµÄÒ»¶Î¾­Àúºó£¬ÖÕÓÚÕÒ¸öÏÂÃæ×°¸öºÜºÃµÄ½Ì³Ì£¬ÌûÉÏÀ´±¸Íü¡£
1¡¢MySQLÃâ°²×°°æ/¶þ½øÖÆ°æÈí¼þ£¬²»ÓñàÒ룬ÏÂÔصØÖ·£º
     http://dev.mysql.com/downloads/
     Îļþ¸ñʽ£ºMYSQL-VERSION-OS.tar.gz
2¡¢´ ......

linux shell½Å±¾Ö®ifÅжÏ

ÎÞÂÛʲô±à³ÌÓïÑÔ¶¼Àë²»¿ªÌõ¼þÅжϡ£SHELLÒ²²»ÀýÍâ¡£
 if list then
          do something here
      elif list then
          do another thing here
      ......

UNIX ÓëLinuxµÄ±È½Ï

    UNIXÊÇÀúÊ·×îÓƾõÄͨÓòÙ×÷ϵͳ¡£1969Ä꣬ÃÀ¹ú±´¶ûʵÑéÊÒµÄK.ThompsonºÍD.M.RitchieÔÚ¹æÄ£½ÏС¼°½Ï¼òµ¥µÄ·Öʱ²Ù×÷ϵͳMULTICSµÄ»ù´¡ÉÏ¿ª·¢³öUNIX, µ±Ê±ÊÇÔÚDECµÄPDP—7СÐͼÆËã»úÉÏʵÏֵģ¬1970ÄêÕýʽͶÈëÔËÐС£´ËºóÊýÄ꣬UNIXÒ»Ö±ÊÇÒ»¸öÏÞÓÚÔÚAT&TÄÚ²¿Ê¹ÓõIJÙ×÷ϵͳ¡£1971Ä꣬·¢Õ¹³öÒÔ PDP- ......

ͨ¹ýsshת·¢X·ÃÎÊLinuxÎÞÍ·¹¤×÷Õ¾

ÎÞÂÛ΢ÈíÈçºÎרעÓÚ×ÀÃ棬XµÄÉè¼Æ»¹ÊÇÄÜÈÃËûÃǺ¹ÑÕ¡£±È½ÏÒ»ÏÂWindowsÔ¶³Ì×ÀÃæ(2008ServerÖÕÓÚÓÐËù¸Ä½ø)ºÍXת·¢µÄЧ¹û¾Í¿ÉÒÔÀí½â£¬ÎªÊ²Ã´*nixµÄÊÀ½çÀïÏÔʾGUI»·¾³ÒÀ¿¿µÄ¾¹È»ÊÇServer-Client¼Ü¹¹¡£
ÔÚWindowsÏ£¬Ö»ÒªÊµÏÖÁ½¸öÒªËؾͿÉÒÔʵÏÖXµÄת·¢£º1.X Server·þÎñ£»2.ssh¿Í»§¶Ë¡£Ç°Õß¿ÉÒÔÓÃXming£¬ºóÕß¿ÉÒÔÓÃputty»òopenS ......

Linuxϵͳµ÷Óà sigactionº¯ÊýÏê½â(Ò»)

¹¦ÄÜÃèÊö£º 
´¦ÀíÐźš£¼È¿ÉÓÃÓÚÉ趨¶ÔÈÎÒâÐźŵĴ¦Àí·½Ê½£¬Ò²¿ÉÓÃÓÚ¼ìÑé¸ÃÐźŵÄÄ¿Ç°Ô¤Éè´¦Ö÷½Ê½¡£
 
  
Ó÷¨£º 
#include <signal.h>
int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact);
       
 &n ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ