linuxÄÚºËÖÐusbϵͳÖ÷ÒªµÄÊý¾Ý½á¹¹
USB Äںˣ¨USBÇý¶¯£¬USBD £©´¦ÓÚϵͳµÄÖÐÐÄ£¬¶ÔÓÚËü½øÐÐÑо¿ÊÇÄܹ»½øÐÐUSBÇý¶¯¿ª·¢£¨°üÀ¨¿Í»§Çý¶¯ºÍÖ÷»úÇý¶¯£©µÄµÚÒ»²½¡£ËüΪ¿Í»§¶ËÇý¶¯ºÍÖ÷»ú¿ØÖÆÆ÷Çý¶¯ÌṩÁËÖ÷ÒªÊý¾Ý½á¹¹ºÍ½Ó¿Úº¯Êý£¬Ö÷ÒªÓÐËÄÀ๦ÄÜ£º¿Í»§¶ËÇý¶¯¹ÜÀí£¬USBÉ豸µÄÅäÖú͹ÜÀí£¬Ö÷»ú¿ØÖÆÆ÷µÄ¹ÜÀí£¬ÐÒé¿ØÖÆÃüÁºÍÊý¾Ý´«ÊäµÄ¹ÜÀí¡£¾ßÌå´úÂëÖ÷Òª¼¯ÖÐÔÚ linux/drivers/usbϵÄusb.c, usb.hÖÐ
Ö÷ÒªÊý¾Ý½á¹¹·ÖÎö
Ö÷ÒªÓÐËĸöÊý¾Ý½á¹¹£¬·Ö±ðÊÇUSBÉ豸usb_device£¬±£´æÁËÒ»¸öUSBÉ豸µÄÐÅÏ¢£¬°üÀ¨É豸µØÖ·£¬É豸ÃèÊö·û£¬ÅäÖÃÃèÊö·û£¬µÈµÈ
USB×ÜÏßϵͳusb_bus£¬±£´æÁËÒ»¸öUSB×ÜÏßϵͳµÄÐÅÏ¢£¬°üÀ¨×ÜÏßÉÏÉ豸µØÖ·ÐÅÏ¢£¬¸ù¼¯ÏßÆ÷£¬´ø¿íʹÓÃÇé¿öµÈ¡£Ò»¸öUSB×ÜÏßϵͳ¿Ï¶¨ÓÐÒ»¸öÖ÷»ú¿ØÖÆÆ÷ºÍÒ»¸ö¸ù¼¯ÏßÆ÷¡£LinuxÖ§³Ö¶àUSB×ÜÏßϵͳ
¿Í»§¶ËÇý¶¯³ÌÐòusb_driver£¬±£´æÁË¿Í»§Çý¶¯ÐÅÏ¢£¬°üÀ¨Çý¶¯Ãû³Æ£¬ÒÔ¼°Çý¶¯Ìṩ¸øUSBÄÚºËʹÓõĺ¯ÊýÖ¸ÕëµÈ
£¨USB Request Block£©urb£¬ÊǽøÐÐUSBͨÐŵÄÊý¾Ý½á¹¹¡£LinuxµÄUSB×ÓϵͳֻʹÓÃÕâôһÖÖÊý¾Ý½á¹¹À´½øÐÐUSBͨÐÅ£¬urb°üº¬Á˽¨Á¢ÈκΠUSB´«ÊäËùÐèµÄËùÓÐÐÅÏ¢£¬²¢¹á´©ÓÚUSBÐÒéÕ»¶ÔÊý¾Ý´¦ÀíµÄÕû¸ö¹ý³Ì¡£
ÏÂÃæÊǶԸ÷²¿·Ö½øÐÐÏêϸ·ÖÎö¡£
struct usb_device { //´ú±íÒ»¸öUSBÉ豸
int devnum; //·ÖÅäµÄÉ豸µØÖ·£¬1-127
enum {
USB_SPEED_UNKNOWN = 0, /* enumerating */
USB_SPEED_LOW, USB_SPEED_FULL, /* usb 1.1 */
USB_SPEED_HIGH /* usb 2.0 */
} speed; //É豸Ëٶȣ¬µÍËÙ/È«ËÙ/¸ßËÙ
struct usb_device *tt; /* usb1.1 device on usb2.0 bus */£¬ÊÂÎñ´¦Àí½âÊÍÆ÷
int ttport; /* device/hub port on that tt */É豸ËùÁ¬½ÓµÄ¾ßÓÐÊÂÎñ´¦Àí½âÊÍÆ÷¹¦Äܵļ¯ÏßÆ÷¶Ë¿Ú
atomic_t refcnt; /* Reference count */ÒýÓüÆÊý
struct semaphore serialize; //ÓÃÓÚͬ²½
unsigned int toggle[2]; /* one bit for each endpoint ([0] = IN, [1] = OUT) */ÓÃÓÚͬ²½Çл»µÄλͼ£¬Ã¿¸ö¶ËµãÕ¼ÓÃ1룬[0]±íʾÊäÈ룬[1]Êä³ö
unsigned int halted[2]; /* endpoint halts; one bit per endpoint # & direction; [0] = IN, [1] = OUT */±íʾ¶ËµãÊÇ·ñ´¦ÓÚֹͣ״̬µÄλͼ
int epmaxpacketin
Ïà¹ØÎĵµ£º
Ò»£ºÇ°ÑÔ
×î½üÔÚÑо¿androidµÄsensor driver£¬Ö÷ÒªÊÇE-compass£¬ÆäÖÐÓõ½ÁËLinux input×Óϵͳ.ÔÚÍøÉÏÒ²¿´Á˺ܶàÕâ·½ÃæµÄ×ÊÁÏ£¬¸Ð¾õ»¹ÊÇÕâƪ·ÖÎöµÄ±È½ÏϸÖÂ͸³¹£¬Òò´ËתÔØÒ»ÏÂÒÔ±ã×Ô¼ºÑ§Ï°£¬Í¬Ê±ºÍ´ó¼Ò·ÖÏí£¡
£¨Õâƪ²©¿ÍÖ÷ÒªÊÇÒÔ¼üÅÌÇý¶¯ÎªÀýµÄ£¬²»¹ý½²½âµÄÊÇLinux Input Subsystem£¬¿ÉÒÔ×ÐϸµÄÑо¿Ò»Ï£¡£©
¼üÅÌÇý¶¯½«¼ì ......
LinuxϵÄѹËõÃüÁî
ѹËõĿ¼file
tar -czf file0117.tar.z file
½âѹ.tarÎļþ
tar -xzf ÎļþÃû.tar
´ò°üĿ¼
tar -cvf file0117.tar file
½â°ü
tar -xvf ÎļþÃû.tar
AIXϵÄѹËõÃüÁî
1. backup: ¼Ó-i²ÎÊý¿É¶ÔÎļþ»òĿ¼½øÐб¸·Ý£¬¼Ó-p²ÎÊý¿É¶ÔÒª±¸·ÝµÄÎļþ½øÐÐѹËõ£¬µ«ÊǽöÄÜѹËõСÓÚ2GµÄÎļþ¡£
2. compress: ¶ ......
rm -rf mydir /* ɾ³ýmydirĿ¼ */
cd mydir /* ½øÈëmydirĿ¼ */
cd – /* »ØÉÏÒ»¼¶Ä¿Â¼ */
cd ~ /* »Ø¸ùĿ¼ */
mv tools tool /* °ÑtoolsĿ¼¸ÄÃûΪtool */
ln -s tool bac
/* ¸øtoolĿ¼´´½¨ÃûΪbacµÄ·ûºÅÁ´½Ó,×îÊìϤµÄÓ¦¸Ã¾ÍÊÇFTPÖÐwwwÁ´½Óµ½public_htmlĿ¼ÁË */
cp -a tool /home/leavex/www /* °Ñtoo ......
Linux »ã±àÓïÑÔ¿ª·¢Ö¸ÄÏ
ÎĵµÑ¡Ïî
<tr
valign="top"><td width="8"><img alt="" height="1" width="8"
src="//www.ibm.com/i/c.gif"/></td><td width="16"><img alt="" width="16"
he ......