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

LinuxÏÂUSB´ÓÉ豸ʹÓÃgadget API

LinuxÏÂUSB´ÓÉ豸ʹÓÃgadget API
[ÈÕÆÚ£º2007-12-27]
À´Ô´£ºLinux¹«Éç  ×÷ÕߣºÎ°Î°
 
×î½üÔÚ×öLinuxÏÂUSB´ÓÉ豸µÄÇý¶¯£¬³ÌÐòдµÄ²î²»¶àÁË£¬×öÒ»¸öÕûÀíС½á¡£»¶Ó­½»Á÷,ÈçÓдíÎóÇëÖ¸Õý,лл!--Jason
Ò»¡¢USB´ÓÉ豸Çý¶¯½éÉÜ
USB×ÜÏßÉÏÖ÷ÒªÓÐÈýÀàÉ豸£ºÖ÷¿ØÖÆÆ÷£¨Host Controller£¬ such as EHCI¡¢UHCI¡¢OHCI£©¡¢¼¯Ï߯÷£¨hub£©ºÍÉ豸£¨device£©¡£Host controller£¨HC£©¸ºÔð×ÜÏߵĹÜÀí£¬ÊÇ×ÜÏßµÄÖ¸»Ó¹Ù£¬×ÜÏßÉÏÒ»Çд«Êä¶¼ÊÇÓÉHC·¢ÆðµÄ£¬Ö§³ÖOTGµÄDeviceÒ²ÄÜ·¢Æð´«Ê䣻HubÊÇ×ÜÏߵĽڵ㣬ÓÃÀ´À©Õ¹×ÜÏßÉϿɽÓÈëÉ豸µÄÊýÁ¿£¬¶ÔÓÚÇý¶¯À´ËµÊÇ͸Ã÷µÄ£»Device¾ÍÊǸ÷ÖÖ¸÷ÑùµÄÉ豸ÁË£¬Ã¿¸öÉ豸¶¼ÓÐ×Ô¼ºµÄ¹¦ÄÜ£¬±ÈÈçUÅÌ¡¢USBÉãÏñÍ·µÈµÈ¡£
LinuxÏÂÖ÷»ú¶ËUSBÉ豸µÄÇý¶¯£¨device driver£©±àдµÄ×ÊÁÏÓкܶ࣬LDD3ÖÐÓÐÏàÓ¦µÄ½éÉÜ¡£Ö÷ÒªÊÇͨ¹ýÄÚºËÖÐUSB coreÕâ¸öÄ£¿éÓëÉ豸½»»¥¡£±¾ÎÄÖ»½éÉÜÔËÐÐLinuxµÄǶÈëʽUSBÉ豸Çý¶¯µÄ±àд¡£ÒòΪHost¶ËÒѾ­Ê¹ÓÃÁËdevice driverÒ»´Ê£¬ÎªÁ˱ÜÃâ»ìÏý£¬Ê¹ÓÃUSB gadget driverÒ»´Î±íʾ´ÓÉ豸Çý¶¯¡£In USB protocol interactions, the device driver is the master (or client driver) and the gadget driver is the slave (or function driver).
Linux USB gadget driver API¶¨ÒåÁËÒ»¸öͨÓõÄgadget driverµÄ½Ó¿Ú£¬gadget driverͨ¹ýAPIÓëµ×²ãUSB controller driverͨÐÅ¡£¸ÃAPIÆÁ±ÎÁ˵ײãÓ²¼þµÄ²»Í¬£¬Ê¹gadget driver×¢ÖØ¹¦ÄܵÄʵÏÖ£¬¾¡Á¿ÓëÓ²¼þÎ޹ء£Slave¶ËϵͳµÄ¼Ü¹¹ÈçÏÂͼËùʾ£º
ÆäÖУ¬gadgetfsÌṩ¸øÓû§¿Õ¼ä³ÌÐòÖ±½ÓÓëUSB device controller½»»¥µÄÄÜÁ¦¡£
¶þ¡¢Ïà¹Ø×ÊÁÏ
USB gadget API LayerµÄÏà¹Ø×ÊÁÏ£º
1£® http://www.linux-usb.org/gadget/
2£® ÄÚºËÖÐ/KernelDoc/gadget/Ŀ¼ÏµÄÎĵµ
3£®×îÖØÒªµÄ¾ÍÊÇ/include/linux/usb_gadget.hÎļþ£¬¸ÃÎļþÖÐÓÐgadget API½Ó¿ÚÊý¾Ý½á¹¹ºÍ·½·¨µÄÏêϸ¶¨Òå¼°×¢ÊÍ¡£
Gadget DriverµÄÀý×Ó£º
4£® ÄÚºË/drivers/usb/gadget/Ŀ¼ÏÂÓÐһЩgadget driverµÄÀý×Ó£¬zero.cΪ×î¼òµ¥µÄÀý×Ó£¬file_storage.cÊÇ´æ´¢É豸µÄgadget driver¡£
 
Èý¡¢gadget API
ÒªÁ˽âgadget API£¬Ö»ÐèÒªÀí½âÍ·Îļþ£¨usb_gadget.h£©Öм¸¸öÖØÒªµÄÊý¾Ý½á¹¹¾Í¿ÉÒÔÁË¡£ÏêϸµÄ×ֶνéÉÜ¿´hÎļþ×¢ÊÍ¡£
£¨1£©
struct usb_gadget {
const struct usb_gadget_ops *ops;
struct usb_ep                *ep0;
struct list_he


Ïà¹ØÎĵµ£º

Linux+Apache+Mysql+PHPÓÅ»¯¼¼ÇÉ


LAMPÕâ¸ö´ÊµÄÓÉÀ´×îÔçʼÓڵ¹úÔÓÖ¾“c't Magazine”£¬Michael KunzeÔÚ1990Äê×îÏȰÑÕâЩÏîÄ¿×éºÏÔÚÒ»Æð´´ÔìÁËLAMPµÄËõд×Ö¡£ÕâЩ×é¼þËäÈ»²¢²»ÊÇ¿ª¿ªÊ¼¾ÍÉè¼ÆÎªÒ»ÆðʹÓõ쬵«ÊÇ£¬ÕâЩ¿ªÔ´Èí¼þ¶¼¿ÉÒԺܷ½±ãµÄËæÊ±»ñµÃ²¢Ãâ·Ñ»ñµÃ¡£Õâ¾Íµ¼ÖÂÁËÕâЩ×é¼þ¾­³£ÔÚÒ»ÆðʹÓá£ÔÚ¹ýÈ¥µÄ¼¸ÄêÀÕâЩ×é¼þµÄ¼æÈÝÐÔ²»¶ÏÍêÉÆ£¬Ô ......

LinuxÔ´Âë°²×°¹ý³ÌÖÐÑ¡Ïî—prefixµÄ×÷ÓÃ(ת)

         ÔÚlinuxºÍunix»·¾³ÖУ¬Ô´Âë°²×°ÊÇ×î³£ÓõÄÈí¼þ°²×°·½Ê½£¬Ò»Ð©Èí¼þ³ýÁËÌṩԴÂëÍ⣬ҲÌṩ¸÷ÖÖ·¢ÐаæµÄ¶þ½øÖư²×°°ü£¨Èç»ùÓÚredhat°ü¹ÜÀí¹¤¾ßµÄrpm°ü£©£¬µ«Ç¿ÁÒ½¨ÒéʹÓÃÔ´Âë°²×°·½Ê½¡£Ô­ÒòÊÇ£º£¨1£©Ã»ÓÐÀàËÆrpmÄÇÑùÈÃÈËÄÕ»ðµÄ°üÒÀÀµ¹ØÏµ£¬£¨2£©Ô´Âë°²×°Áé»î×ÔÓÉ£¬ÊÊÓÃÓÚ²» ......

LINUXÃÜÂ붪ʧ½â¾ö


°æÈ¨ÉùÃ÷£º×ª×Ôhttp://jilulishi.blog.51cto.com/237211/64023
GRUB:ÔÚÒýµ¼×°ÔسÌÐò²Ëµ¥ÉÏ£¬¼üÈë [e] À´½øÈë±à¼­Ä£Ê½¡£
Äã»áÃæ¶ÔÒ»¸öÒýµ¼ÏîÄ¿ÁÐ±í¡£²éÕÒÆäÖÐÀàËÆÒÔÏÂÊä³ö µÄ¾äÐУº
kernel /vmlinuz-2.4.18-0.4 ro root=/dev/hda2
°´¼ýÍ·¼üÖ±µ½ÕâÒ»Ðб»Í»³öÏÔʾ£¬È»ºó°´ [e]¡£
ÄãÏÖÔÚ¿ÉÔÚÎı¾½áβ´¦¿ÕÒ»¸ñÔÙÌí¼Ó ......

Linux³£ÓÃshellÃüÁî


linux shell¼°³£ÓÃÃüÁî½éÉÜ
ʲôÊÇshell
  shellÊÇÒ»ÖÖÃüÁî½âÊÍÆ÷£¬ËüÌṩÁËÓû§ºÍ²Ù×÷ϵͳ֮¼äµÄ½»»¥½Ó¿Ú¡£shellÊÇÃæÏòÃüÁîÐеģ¬
¶ø X Window ÔòÊÇͼÐνçÃæ¡£ÄãÔÚÃüÁîÐÐÊäÈëÃüÁshell½øÐнâÊÍ£¬È»ºóËÍÍù²Ù×÷ϵͳִÐС£
shell¿ÉÒÔÖ´ÐÐ Linux µÄϵͳÄÚ²¿ÃüÁҲ¿ÉÒÔÖ´ÐÐÓ¦ÓóÌÐò¡£Ä㻹¿ÉÒÔÀûÓÃshell±à³Ì£¬Ö´Ð ......

linux Ï eclipseME ²å¼þµÄ°²×°²½Öè

linux Ï eclipseME ²å¼þµÄ°²×°²½Öè
×î½üÔÚlinuxÏÂ×÷¿ª·¢£¬²Î¿¼ÍøÂç×ÊÁÏ£¬³É¹¦½« eclipseME ²å¼þ°²×°ÖÁ eclipse¡£ÕâÀï¼Ç¼ÏÂÀ´£¬Ö»ÎªÁË·½±ã¸ü¶àµÄÈË£¡
±³¾°£º
linux£ºCentOS release 5.3 (Final)
jdk: jdk1.6.0_16
eclipse: eclipse-SDK-3.4.1-linux
²½Ö裺
Ò».ÏÂÔØ×îРWTK2.5.2 °ü 4linux
sun_java_wireless_too ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ