Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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ÏÂʵÏÖweb qqµÄ×ÀÃæ»¯


´´½¨×ÀÃæÍ¼±ê
Ŀǰ½«ÍøÂçÓ¦ÓÃÀ©Õ¹µ½×ÀÃæÊÇÒ»¸öÇ÷ÊÆ£¬´æÔÚןܶà½â¾ö·½°¸£¬±¾ÎÄÒÔ Mozilla Prism ΪÀý£¬ÀàËÆµÄ·½·¨Í¬ÑùÊÊÓÃÓÚ Google Chrome ¡£
1. µ½ Mozilla Prism µÄÍøÕ¾ÉÏÏÂÔØ Prism£¬µã»÷ Download Now Ö®ºó»áÌáʾÓÐÁ½ÖÖ£¬Ò»ÖÖÊÇÒÔ Mozilla Firefox À©Õ¹µÄ·½Ê½£¬ÊʺÏÒѾ­°²×°ÓÐ Firefox µÄÅóÓÑ£»Ò»Ö ......

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

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

linux½ø³ÌͨÐÅ ÐźÅÁ¿Ê¹ÓÃ

±êÌ⣺Linux½ø³ÌͨÐÅ-ʹÓÃÐźÅÁ¿
Ò»¡¢Ïà¹ØÖªÊ¶
 ÐźÅÁ¿£ºÒ»¸öÕûÊý£»
  ´óÓÚ»òµÈÓÚ0ʱ´ú±í¿É¹©²¢·¢½ø³ÌʹÓõÄ×ÊԴʵÌåÊý£»
  СÓÚ0ʱ´ú±íÕýÔڵȴýʹÓÃÁÙ½çÇøµÄ½ø³ÌÊý£»
  ÓÃÓÚ»¥³âµÄÐźÅÁ¿³õʼֵӦ´óÓÚ0£»
  Ö»ÄÜͨ¹ýP¡¢VÔ­Óï²Ù×÷¶ø¸Ä±ä£»
 ÐźÅÁ¿ÔªËØ×é³É£º
  1¡¢±íʾÐźÅÁ¿ÔªË ......

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ºÅ