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

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

Ò»¡¢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_head              ep_list;
enum usb_device_speed        speed;
unsigned  


Ïà¹ØÎĵµ£º

LinuxÎļþϵͳѡÔñ


ͨ¹ý×ÛºÏʹÓöàÖÖ±ê×¼ÎļþϵͳBenchmarks¶ÔExt3, Ext4, Reiserfs, XFS, JFS, Reiser4µÄÐÔÄܲâÊԶԱȣ¬¶Ô²»Í¬Ó¦ÓÃÑ¡ÔñºÏÊʵÄÎļþϵͳ¸ø³öÒÔÏ·½°¸£¬¹©´ó¼Ò²Î¿¼¡£ÎļþϵͳÐÔÄܲâÊÔÊý¾Ý¼û¸½±í¡£
1¡¢´óÁ¿Ð¡Îļþ£¨LOSF, Lost of small files£©I/OÓ¦ÓÃ(ÈçСͼƬ)
Reiserfs(Ê×Ñ¡), Ext4ÎļþϵͳÊʺÏÕâÀฺÔØÌØÕ÷£¬IOµ÷¶ÈË㷨ѡ ......

LinuxÏÂOracle×Ô¶¯±¸·Ý½Å±¾

LinuxÏÂOracle×Ô¶¯±¸·Ý½Å±¾
http://freeglad.javaeye.com/blog/586444
½Å±¾Îļþ£º
backup.sh
rq=`date '+%Y%m%d%H%M'`
su - oracle -c "exp zjhk/zjhk_123 owner=zjhk file=/home/oracle/zjhk_$rq.dmp"
cronÊÇÒ»¸ölinuxϵĶ¨Ê±Ö´Ðй¤¾ß£¬¿ÉÒÔÔÚÎÞÐèÈ˹¤¸ÉÔ¤µÄÇé¿öÏÂÔËÐÐ×÷Òµ¡£ÓÉÓÚCron ÊÇLinuxµÄÄÚÖ÷þÎñ£¬µ«Ëü²»×Ô¶ ......

Linux ÉèÖÃDNSºÍÖ÷»úÃû

LinuxÏÂÅäÖþ²Ì¬IPµØÖ·£¬ÉèÖÃDNSºÍÖ÷»úÃû
ÅäÖÃÎļþλÓÚ£º
/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.0.3
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
ʹ
IPµØÖ·ÉúЧ£º
/sbin/ifdown eth0
/sbin/ifup eth0
Ö÷»úÃûÅäÖÃ /etc/sysconfig/network
NETWO ......

dzÎöLinuxÏÂcoreÎļþ

µ±ÎÒÃǵijÌÐò±ÀÀ£Ê±£¬ÄÚºËÓпÉÄܰѸóÌÐòµ±Ç°ÄÚ´æÓ³Éäµ½coreÎļþÀ·½±ã³ÌÐòÔ±ÕÒµ½³ÌÐò³öÏÖÎÊÌâµÄµØ·½¡£×î³£³ö
Ïֵģ¬¼¸ºõËùÓÐC³ÌÐòÔ±¶¼³öÏÖ¹ýµÄ´íÎó¾ÍÊÇ“¶Î´íÎó”ÁË¡£Ò²ÊÇ×îÄѲé³öÎÊÌâÔ­ÒòµÄÒ»¸ö´íÎó¡£ÏÂÃæÎÒÃǾÍÕë¶Ô“¶Î´íÎó”À´·ÖÎöcoreÎļþµÄ²úÉú¡¢ÒÔ¼°ÎÒÃÇ
ÈçºÎÀûÓÃcoreÎļþÕÒµ½³öÏÖ±ÀÀ£µÄµØ· ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ