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

LinuxÄÚºËÉ豸ģÐÍ(3)

ÒëÕߣº¹ùÉÙ±¯
2009/12/01
Ô­ÎÄ£ºlinux-2.6/Documentation/driver-model/bus.txt
×ÜÏßÀàÐÍ
¶¨Òå
~~~~
struct bus_type {
    char            * name;
    struct subsystem    subsys;
    struct kset        drivers;
    struct kset        devices;
    struct bus_attribute    * bus_attrs;
    struct device_attribute    * dev_attrs;
    struct driver_attribute    * drv_attrs;
    int        (*match)(struct device * dev, struct device_driver * drv);
    int        (*hotplug) (struct device *dev, char **envp,
                    int num_envp, char *buffer, int buffer_size);
    int        (*suspend)(struct device * dev, pm_message_t state);
    int        (*resume)(struct device * dev);
};
int bus_register(struct bus_type * bus);
ÉùÃ÷
~~~~
ÄÚºËÀïµÄÿһ¸ö×ÜÏßÀàÐÍ£¨PCI£¬USB£¬µÈ£©Ó¦µ±ÉùÃ÷Ò»¸ö¾²Ì¬µÄ¶ÔÏó¡£ËüÃDZØÐë³õʼ
»¯nameÓò£¬ÓÐʱҲ³õʼ»¯match()»Øµ÷º¯Êý¡£
struct bus_type pci_bus_type = {
       .name    = "pci",
       .match    = pci_bus_match,
};
¸ÃÊý¾Ý½á¹¹Ó¦µ±±»°üº¬ÔÚÒ»¸öÍ·ÎļþÀÏòÏà¹ØµÄÇý¶¯µ¼³ö:
extern struct bus_type pci_bus_type;
×¢²á
~~~~~
×ÜÏßÇý¶¯ÔÚ³õʼ»¯µÄʱºò£¬»áµ÷ÓÃbus_register()¡£Ëü³õʼ»¯×ÜÏß¶ÔÏóµÄÆäÓàµÄÓò£¬
²¢½«×ÜÏß¶ÔÏó²åÈëµ½×ÜÏßÀàÐ͵ÄÈ«¾ÖÁ´±íÀï¡£Ò»µ©×ÜÏß¶ÔÏó±»×¢²á£¬
ËüµÄÿ¸öÓò¶ÔÓÚ×ÜÏßÇý¶¯¶¼ÊÇ¿ÉÓõġ£
»Øµ÷º¯Êý
~~~~~~~~
match():¹ØÁªÇý¶¯µ½É豸
~~~~~~~~~~~~~~~~~~~~~~
É豸µÄIDÊý¾Ý½á¹¹µÄ¸ñʽºÍ±È½ÏÓï·¨ÓÉÆä×ÜÏß×Ô¼º¹æ¶¨¡£Çý¶


Ïà¹ØÎĵµ£º

ʵսLinux Bluetooth±à³Ì£¨Èý£© HCI²ã±à³Ì

1. HCI²ãЭÒé¸ÅÊö£º
HCIÌṩһÌ×ͳһµÄ·½·¨À´·ÃÎÊBluetoothµ×²ã¡£ÈçͼËùʾ£º
´ÓͼÉÏ¿ÉÒÔ¿´³ö£¬Host Controller Interface(HCI)  ¾ÍÊÇÓÃÀ´¹µÍ¨HostºÍModule¡£Hostͨ³£¾ÍÊÇPC£¬ ModuleÔòÊÇÒÔ¸÷ÖÖÎïÀíÁ¬½ÓÐÎʽ£¨USB,serial,pc-cardµÈ£©Á¬½Óµ½PCÉϵÄbluetooth Dongle¡£
ÔÚHostÕâÒ»¶Ë£ºapplication,SDP,L2capµÈЭÒé ......

ʵսLinux Bluetooth±à³Ì£¨ËÄ£© L2CAP²ã±à³Ì

£¨L2CAPЭÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPЭÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼­Á¬½Ó¿ØÖƺÍÊÊÅäЭÒé (L2CAP) ΪÉϲãЭÒéÌá¹©ÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àЭÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãЭÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......

ʵսLinux Bluetooth±à³Ì(Áù) L2CAP±à³ÌʵÀý

ÀýÒ»£º·¢ËÍSignaling Packet£º
Signaling CommandÊÇ2¸öBluetoothʵÌåÖ®¼äµÄL2CAP²ãÃüÁî´«Êä¡£ËùÒÔµÃSignaling CommandʹÓÃCID 0x0001.
¶à¸öCommand¿ÉÒÔÔÚÒ»¸öC-frame£¨control frame£©Öз¢ËÍ¡£
 Èç¹ûÒªÖ±½Ó·¢ËÍSignaling Command.ÐèÒª½¨Á¢SOCK_RAWÀàÐ͵ÄL2CAPÁ¬½ÓSocket¡£ÕâÑù²ÅÓлú»á×Ô¼ºÌî³äCommand Code£¬Identi ......

Red Hat Enterprise Linux 5°²×°VM ware Tools

RHEL5ÔÚ°²×°VM-wareTools¹ý³ÌÖгöÏÖÈçÏ´íÎó£º
What is the
location of the directory of C header files that match your running kernel?
[/usr/src/linux/include] The directory of kernel headers (version
2.6.18-8.el5xen) does not match
´Ë´íÎóÖ÷ÒªÊÇÏëÕÒLinuxÄں˵İüº¬Í·ÎļþÕÒ²»µ½¡£Òª½â¾ö´ËÎÊÌâÐèÒª° ......

Linux Bashѧϰ£¨Î壩£ºÉèÖû·¾³


¡¡¡¡±¾ÎÄÒ²¼´¡¶Learning the bash Shell¡·3rd EditionµÄµÚÈýÕÂCustomizing Your EnvironmentÖ®¶ÁÊé±Ê¼Ç£¬µ«ÎÒÃǽ«²»ÏÞÓÚ´Ë¡£ÉèÖÃÒ»¸öºÃµÄÓû§»·¾³£¬¶ÔÎÒÃÇ¿ª·¢ÊǷdz£¹Ø¼üµÄ¡£ÔÚÕâÒ»Õ½ÚÖУ¬´ÓËĸö·½Ãæ½øÐнéÉÜ£ºÌرðµÄÎļþ£¬±ðÃû£¬Ñ¡Ï²ÎÊý¡£
ÌØÊâÎļþ
¡¡¡¡ÔÚÓû§Ä¿Â¼ÏÂÓм¸¸öÌØÊâµÄÎļþ£¬¿ÉÒÔÓÃls -a
À´²é¿´ÕâЩÒþ² ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ