一、重要知識點(diǎn):
設(shè)備模型由總線、設(shè)備、驅(qū)動(dòng)三要素組成。
底層模型決定上層模型,在總線,設(shè)備,驅(qū)動(dòng)的結(jié)構(gòu)體中你總是可以看到它們間接或者直接的包含了kobject結(jié)構(gòu)或kset結(jié)構(gòu)。
1.總線
總線是處理器和設(shè)備之間的通道,在設(shè)備模型中,所有設(shè)備都通過總線相連,甚至內(nèi)部的虛擬“platform”總線。在linux設(shè)備模型中,總線由bus_type結(jié)構(gòu)表示。定義在中。
總線描述
struct?bus_type?{??
const?char??????????????????*name;//總線名稱??
struct?bus_attribute????????*bus_attrs//總線屬性??
struct?device_attribute???*dev_attrs;//設(shè)備屬性??
struct?driver_attribute????*drv_attrs;//驅(qū)動(dòng)屬性??
int?(*match)(struct?device?*dev,?struct?device_driver?*drv);??
int?(*uevent)(struct?device?*dev,?struct?kobj_uevent_env?*env);??
int?(*probe)(struct?device?*dev);??
int?(*remove)(struct?device?*dev);??
void?(*shutdown)(struct?device?*dev);??
int?(*suspend)(struct?device?*dev,?pm_message_t?state);??
int?(*suspend_late)(struct?device?*dev,?pm_message_t?state);??
int?(*resume_early)(struct?device?*dev);??
int?(*resume)(struct?device?*dev);??
struct?dev_pm_ops?*pm;??
struct?bus_type_private?*p;??
};??
struct bus_type {const char *name;//總線名稱struct bus_attribute *bus_attrs//總線屬性struct device_attribute *dev_attrs;//設(shè)備屬性struct driver_attribute *drv_attrs;//驅(qū)動(dòng)屬性int (*match)(struct device *dev, struct device_driver *drv);int (*uevent)(struct device *dev, struct kobj_uevent_env *env);int (*probe)(struct device *dev);int (*remove)(struct device *dev);void (*shutdown)(struct device *dev);int (*suspend)(struct device *dev, pm_message_t state);int (*suspend_late)(struct device *dev, pm_message_t state);int (*resume_early)(struct device *dev);int (*resume)(struct device *dev);struct dev_pm_ops *pm;struct bus_type_private *p;};
bus_type的bus_type_private?成員
struct?bus_type_private?{??
struct?kset?subsys;??
struct?kset?*drivers_kset;??
struct?kset?*devices_kset;??
struct?klist?klist_devices;??
struct?klist?klist_drivers;??
struct?blocking_notifier_head?bus_notifier;??
unsigned?int?drivers_autoprobe:1;??
struct?bus_type?*bus;??
};??
struct bus_type_private {struct kset subsys;struct kset *drivers_kset;struct kset *devices_kset;struct klist klist_devices;struct klist klist_drivers;struct blocking_notifier_head bus_notifier;unsigned int drivers_autoprobe:1;struct bus_type *bus;};
?
可以看出該結(jié)構(gòu)體中包含了有device和dirver的kset對象。
總線的注冊:
int bus_register(structbus_type *bus);
如果成功,新的總線將被添加到系統(tǒng),在/sys/bus目錄下可以看到。
我們在深入看這個(gè)函數(shù)
int?bus_register(struct?bus_type?*bus)??
{??
int?retval;??
struct?bus_type_private?*priv;??
priv?=?kzalloc(sizeof(struct?bus_type_private),?GFP_KERNEL);??
if?(!priv)??
return?-ENOMEM;??
priv->busbus?=?bus;??
bus->p?=?priv;??
int bus_register(struct bus_type *bus){int retval;struct bus_type_private *priv;priv = kzalloc(sizeof(struct bus_type_private), GFP_KERNEL);if (!priv)return -ENOMEM;priv->bus = bus;bus->p = priv;
BLOCKING_INIT_NOTIFIER_HEAD(&priv->bus_notifier);??
retval?=?kobject_set_name(&priv->subsys.kobj,?"%s",?bus->name);??
if?(retval)??
goto?out;??
priv->subsys.kobj.kset?=?bus_kset;??
priv->subsys.kobj.ktype?=?&bus_ktype;??
priv->drivers_autoprobe?=?1;??
retval?=?kset_register(&priv->subsys);??
if?(retval)??
goto?out;??
retval?=?bus_create_file(bus,?&bus_attr_uevent);??
if?(retval)??
goto?bus_uevent_fail;??
priv->devices_kset?=?kset_create_and_add("devices",?NULL,??
&priv->subsys.kobj);??
if?(!priv->devices_kset)?{??
retval?=?-ENOMEM;??
goto?bus_devices_fail;??
}??
priv->drivers_kset?=?kset_create_and_add("drivers",?NULL,??
&priv->subsys.kobj);??
if?(!priv->drivers_kset)?{??
retval?=?-ENOMEM;??
goto?bus_drivers_fail;??
}??
klist_init(&priv->klist_devices,?klist_devices_get,?klist_devices_put);??
klist_init(&priv->klist_drivers,?NULL,?NULL);??
retval?=?add_probe_files(bus);??
if?(retval)??
goto?bus_probe_files_fail;??
retval?=?bus_add_attrs(bus);??
if?(retval)??
goto?bus_attrs_fail;??
pr_debug("bus:?'%s':?registered\n",?bus->name);??
return?0;??
bus_attrs_fail:??
remove_probe_files(bus);??
bus_probe_files_fail:??
kset_unregister(bus->p->drivers_kset);??
bus_drivers_fail:??
kset_unregister(bus->p->devices_kset);??
bus_devices_fail:??
bus_remove_file(bus,?&bus_attr_uevent);??
bus_uevent_fail:??
kset_unregister(&bus->p->subsys);??
kfree(bus->p);??
out:??
return?retval;??
}??
BLOCKING_INIT_NOTIFIER_HEAD(&priv->bus_notifier);retval = kobject_set_name(&priv->subsys.kobj, "%s", bus->name);if (retval)goto out;priv->subsys.kobj.kset = bus_kset;priv->subsys.kobj.ktype = &bus_ktype;priv->drivers_autoprobe = 1;retval = kset_register(&priv->subsys);if (retval)goto out;retval = bus_create_file(bus, &bus_attr_uevent);if (retval)goto bus_uevent_fail;priv->devices_kset = kset_create_and_add("devices", NULL,&priv->subsys.kobj);if (!priv->devices_kset) {retval = -ENOMEM;goto bus_devices_fail;}priv->drivers_kset = kset_create_and_add("drivers", NULL,&priv->subsys.kobj);if (!priv->drivers_kset) {retval = -ENOMEM;goto bus_drivers_fail;}klist_init(&priv->klist_devices, klist_devices_get, klist_devices_put);klist_init(&priv->klist_drivers, NULL, NULL);retval = add_probe_files(bus);if (retval)goto bus_probe_files_fail;retval = bus_add_attrs(bus);if (retval)goto bus_attrs_fail;pr_debug("bus: '%s': registered\n", bus->name);return 0;bus_attrs_fail:remove_probe_files(bus);bus_probe_files_fail:kset_unregister(bus->p->drivers_kset);bus_drivers_fail:kset_unregister(bus->p->devices_kset);bus_devices_fail:bus_remove_file(bus, &bus_attr_uevent);bus_uevent_fail:kset_unregister(&bus->p->subsys);kfree(bus->p);out:return retval;}
?
從這里
priv->subsys.kobj.kset = bus_kset;
priv->subsys.kobj.ktype = &bus_ktype;
可以看得出總線初始化了自己的kset對象。
總線的刪除
void bus_unregister(struct bus_type *bus);
總線的match方法
int (*match)(struct device *dev, struct device_driver *drv);
當(dāng)一個(gè)新設(shè)備或者驅(qū)動(dòng)被添加到這個(gè)總線時(shí),該方法被調(diào)用,用于判斷指定的驅(qū)動(dòng)程序是否能處理指定的設(shè)備。若可以,則返回非0值。下面的測試程序采用匹配設(shè)備的dev->bus_id字符串和驅(qū)動(dòng)的drv->name字符串是否相同來判斷驅(qū)動(dòng)是否能處理該設(shè)備。
總線uevent方法
int ?(*uevent)(structdevice *dev, char **envp, int num_envp)
在為用戶產(chǎn)生熱插拔事件之前,這個(gè)方法允許總線添加環(huán)境變量。
總線屬性由結(jié)構(gòu)bus_attribute描述:
struct bus_attribute {
struct attribute??????? attr;
ssize_t (*show)(struct bus_type *bus,char *buf);
ssize_t (*store)(struct bus_type *bus,const char *buf, size_t count);
};
BUS_ATTR(name,mode, show, store)
在編譯時(shí)創(chuàng)建和初始化bus_attribute結(jié)構(gòu),它將bus_attr_作為給定前綴來創(chuàng)建總線的真正名稱。
如:static BUS_ATTR(version, S_IRUGO, show_bus_version, NULL);
將創(chuàng)建一個(gè)bus_attr_version結(jié)構(gòu)體對象。
int bus_create_file(struct bus_type *bus, struct bus_attribute *attr)
創(chuàng)建屬性文件
void bus_remove_file(struct bus_type *bus, struct bus_attribute *attr)
刪除屬性文件
2.設(shè)備
struct?device?{??
struct?klist?klist_children;??
struct?klist_nodeknode_parent;/*?node?in?sibling?list?*/??
struct?klist_nodeknode_driver;??
struct?klist_nodeknode_bus;??
struct?device?*parent;??
struct?kobject?kobj;??
char?bus_id[BUS_ID_SIZE];/*?position?on?parent?bus?*/??
unsigned?uevent_suppress:1;??
const?char?*init_name;?/*?initial?name?of?the?device?*/??
struct?device_type*type;??
struct?semaphoresem;/*?semaphore?to?synchronize?calls?to??
*?its?driver.??
*/??
struct?bus_type*bus;/*?type?of?bus?device?is?on?*/??
struct?device_driver?*driver;/*?which?driver?has?allocated?this??
device?*/??
void?*driver_data;/*?data?private?to?the?driver?*/??
void?*platform_data;/*?Platform?specific?data,?device??
core?doesn't?touch?it?*/??
struct?dev_pm_infopower;??
#ifdef?CONFIG_NUMA??
int?numa_node;/*?NUMA?node?this?device?is?close?to?*/??
#endif??
u64?*dma_mask;/*?dma?mask?(if?dma'able?device)?*/??
u64?coherent_dma_mask;/*?Like?dma_mask,?but?for??
alloc_coherent?mappings?as??
not?all?hardware?supports??
64?bit?addresses?for?consistent??
allocations?such?descriptors.?*/??
struct?device_dma_parameters?*dma_parms;??
struct?list_headdma_pools;/*?dma?pools?(if?dma'ble)?*/??
struct?dma_coherent_mem*dma_mem;?/*?internal?for?coherent?mem??
override?*/??
/*?arch?specific?additions?*/??
struct?dev_archdataarchdata;??
dev_t?devt;/*?dev_t,?creates?the?sysfs?"dev"?*/??
spinlock_t?devres_lock;??
struct?list_headdevres_head;??
struct?klist_nodeknode_class;??
struct?class?*class;??
struct?attribute_group**groups;/*?optional?groups?*/??
void?(*release)(struct?device?*dev);??
};??
struct device {struct klist klist_children;struct klist_nodeknode_parent;/* node in sibling list */struct klist_nodeknode_driver;struct klist_nodeknode_bus;struct device *parent;struct kobject kobj;char bus_id[BUS_ID_SIZE];/* position on parent bus */unsigned uevent_suppress:1;const char *init_name; /* initial name of the device */struct device_type*type;struct semaphoresem;/* semaphore to synchronize calls to* its driver.*/struct bus_type*bus;/* type of bus device is on */struct device_driver *driver;/* which driver has allocated thisdevice */void *driver_data;/* data private to the driver */void *platform_data;/* Platform specific data, devicecore doesn't touch it */struct dev_pm_infopower;#ifdef CONFIG_NUMAint numa_node;/* NUMA node this device is close to */#endifu64 *dma_mask;/* dma mask (if dma'able device) */u64 coherent_dma_mask;/* Like dma_mask, but foralloc_coherent mappings asnot all hardware supports64 bit addresses for consistentallocations such descriptors. */struct device_dma_parameters *dma_parms;struct list_headdma_pools;/* dma pools (if dma'ble) */struct dma_coherent_mem*dma_mem; /* internal for coherent memoverride *//* arch specific additions */struct dev_archdataarchdata;dev_t devt;/* dev_t, creates the sysfs "dev" */spinlock_t devres_lock;struct list_headdevres_head;struct klist_nodeknode_class;struct class *class;struct attribute_group**groups;/* optional groups */void (*release)(struct device *dev);};
?
可以看出device結(jié)構(gòu)體中也包含了一個(gè)kobject對象
intdevice_register(struct device *dev);
注冊設(shè)備
vioddevice_unregister(struct device *dev)
注銷設(shè)備
設(shè)備屬性由struct device_attribute描述
structdevice_attribute {
struct attribute??????? attr;
ssize_t (*show)(struct device *dev,struct device_attribute *attr,
char *buf);
ssize_t (*store)(struct device *dev,struct device_attribute *attr,
const char *buf, size_t count);
};
int device_create_file(struct device *dev, struct device_attibute *entry)
創(chuàng)建屬性文件
void device_remove_file(struct device *dev, struct device_attibute *entry)
刪除屬性文件
3.驅(qū)動(dòng)
驅(qū)動(dòng)程序由struct device_driver描述:
struct?device_driver?{??
const?char?*name;??
struct?bus_type*bus;??
struct?module?*owner;??
const?char?*mod_name;/*?used?for?built-in?modules?*/??
int?(*probe)?(struct?device?*dev);??
int?(*remove)?(struct?device?*dev);??
void?(*shutdown)?(struct?device?*dev);??
int?(*suspend)?(struct?device?*dev,?pm_message_t?state);??
int?(*resume)?(struct?device?*dev);??
struct?attribute_group?**groups;??
struct?dev_pm_ops?*pm;??
struct?driver_private?*p;??
};??
struct device_driver {const char *name;struct bus_type*bus;struct module *owner;const char *mod_name;/* used for built-in modules */int (*probe) (struct device *dev);int (*remove) (struct device *dev);void (*shutdown) (struct device *dev);int (*suspend) (struct device *dev, pm_message_t state);int (*resume) (struct device *dev);struct attribute_group **groups;struct dev_pm_ops *pm;struct driver_private *p;};
?
在看device_dirver的driver_private 對象
struct driver_private {
struct kobject kobj;
struct klist klist_devices;
struct klist_node knode_bus;
struct module_kobject *mkobj;
struct device_driver *driver;
};
可以看出driver_private結(jié)構(gòu)體中也包含了一個(gè)kobject對象。和連接設(shè)備的鏈表。
當(dāng)總線的match返回非0值,也就是總線找到與驅(qū)動(dòng)相匹配的設(shè)備時(shí),驅(qū)動(dòng)的probe的函數(shù)將被調(diào)用。
當(dāng)設(shè)備從系統(tǒng)總刪除是remove被調(diào)用。
當(dāng)系統(tǒng)關(guān)機(jī)的時(shí)候shutdown被調(diào)用。
int driver_register(structdevice_driver *drv)
在總線上注冊驅(qū)動(dòng)
void driver_unregister(struct device_driver *drv)
載總線上注銷驅(qū)動(dòng)
驅(qū)動(dòng)的屬性使用structdriver_attribute來描述
structdriver_attribute{
structattribue attr;
ssize_t(*show)(struct device_driver *drv, const char *buf);
ssize_t(*store)(struct device_driver *drv, const char *buf, size_t count);
}
int dirver_create_file(struct device_driver *drv, struct driver_attribute *attr);
創(chuàng)建屬性文件
void driver_remove_file struct device_driver *drv, struct driver_attribute *attr);
刪除屬性文件
二、測試模塊
1.BUS
#include?
#include?
#include?
#include?
#include?
MODULE_AUTHOR("David?Xie");??
MODULE_LICENSE("Dual?BSD/GPL");??
static?char?*Version?=?"$Revision:?1.9?{1}quot;;??
static?int?my_match(struct?device?*dev,?struct?device_driver?*driver)??
{??
return?!strncmp(dev->bus_id,?driver->name,?strlen(driver->name));??
}??
static?void?my_bus_release(struct?device?*dev)??
{??
printk(KERN_DEBUG?"my?bus?release\n");??
}??
struct?device?my_bus?=?{??
.bus_id???=?"my_bus0",??
.release??=?my_bus_release??
};??
struct?bus_type?my_bus_type?=?{??
.name?=?"my_bus",??
.match?=?my_match,??
};??
EXPORT_SYMBOL(my_bus);??
EXPORT_SYMBOL(my_bus_type);??
/*??
*?Export?a?simple?attribute.??
*/??
static?ssize_t?show_bus_version(struct?bus_type?*bus,?char?*buf)??
{??
return?snprintf(buf,?PAGE_SIZE,?"%s\n",?Version);??
}??
static?BUS_ATTR(version,?S_IRUGO,?show_bus_version,?NULL);??
static?int?__init?my_bus_init(void)??
{??
int?ret;??
/*注冊總線*/??
ret?=?bus_register(&my_bus_type);??
if?(ret)??
return?ret;??
/*創(chuàng)建屬性文件*/????
if?(bus_create_file(&my_bus_type,?&bus_attr_version))??
printk(KERN_NOTICE?"Fail?to?create?version?attribute!\n");??
/*注冊總線設(shè)備*/??
ret?=?device_register(&my_bus);??
if?(ret)??
printk(KERN_NOTICE?"Fail?to?register?device:my_bus!\n");??
return?ret;??
}??
static?void?my_bus_exit(void)??
{??
device_unregister(&my_bus);??
bus_unregister(&my_bus_type);??
}??
module_init(my_bus_init);??
module_exit(my_bus_exit);??
#include #include #include #include #include MODULE_AUTHOR("David Xie");MODULE_LICENSE("Dual BSD/GPL");static char *Version = "$Revision: 1.9 {1}quot;;static int my_match(struct device *dev, struct device_driver *driver){return !strncmp(dev->bus_id, driver->name, strlen(driver->name));}static void my_bus_release(struct device *dev){printk(KERN_DEBUG "my bus release\n");}struct device my_bus = {.bus_id = "my_bus0",.release = my_bus_release};struct bus_type my_bus_type = {.name = "my_bus",.match = my_match,};EXPORT_SYMBOL(my_bus);EXPORT_SYMBOL(my_bus_type);/** Export a simple attribute.*/static ssize_t show_bus_version(struct bus_type *bus, char *buf){return snprintf(buf, PAGE_SIZE, "%s\n", Version);}static BUS_ATTR(version, S_IRUGO, show_bus_version, NULL);static int __init my_bus_init(void){int ret;/*注冊總線*/ret = bus_register(&my_bus_type);if (ret)return ret;/*創(chuàng)建屬性文件*/if (bus_create_file(&my_bus_type, &bus_attr_version))printk(KERN_NOTICE "Fail to create version attribute!\n");/*注冊總線設(shè)備*/ret = device_register(&my_bus);if (ret)printk(KERN_NOTICE "Fail to register device:my_bus!\n");return ret;}static void my_bus_exit(void){device_unregister(&my_bus);bus_unregister(&my_bus_type);}module_init(my_bus_init);module_exit(my_bus_exit);
創(chuàng)建一條名為my_bus_type的總線和一個(gè)名為my_bus的總線設(shè)備,注意總線也是一個(gè)設(shè)備,也需要注冊。
測試結(jié)果:
?
2.DEVICE
#include?
#include?
#include?
#include?
#include?
MODULE_AUTHOR("David?Xie");??
MODULE_LICENSE("Dual?BSD/GPL");??
extern?struct?device?my_bus;???
extern?struct?bus_type?my_bus_type;??
/*?Why?need?this??*/??
static?void?my_dev_release(struct?device?*dev)??
{???
}??
struct?device?my_dev?=?{??
.bus?=?&my_bus_type,??
.parent?=?&my_bus,??
.release?=?my_dev_release,??
};??
/*??
*?Export?a?simple?attribute.??
*/??
static?ssize_t?mydev_show(struct?device?*dev,?char?*buf)??
{??
return?sprintf(buf,?"%s\n",?"This?is?my?device!");??
}??
static?DEVICE_ATTR(dev,?S_IRUGO,?mydev_show,?NULL);??
static?int?__init?my_device_init(void)??
{??
int?ret?=?0;??
/*?初始化設(shè)備?*/??
strncpy(my_dev.bus_id,?"my_dev",?BUS_ID_SIZE);??
/*注冊設(shè)備*/??
device_register(&my_dev);??
/*創(chuàng)建屬性文件*/??
device_create_file(&my_dev,?&dev_attr_dev);??
return?ret;???
}??
static?void?my_device_exit(void)??
{??
device_unregister(&my_dev);??
}??
module_init(my_device_init);??
module_exit(my_device_exit);??
#include #include #include #include #include MODULE_AUTHOR("David Xie");MODULE_LICENSE("Dual BSD/GPL");extern struct device my_bus;extern struct bus_type my_bus_type;/* Why need this ?*/static void my_dev_release(struct device *dev){}struct device my_dev = {.bus = &my_bus_type,.parent = &my_bus,.release = my_dev_release,};/** Export a simple attribute.*/static ssize_t mydev_show(struct device *dev, char *buf){return sprintf(buf, "%s\n", "This is my device!");}static DEVICE_ATTR(dev, S_IRUGO, mydev_show, NULL);static int __init my_device_init(void){int ret = 0;/* 初始化設(shè)備 */strncpy(my_dev.bus_id, "my_dev", BUS_ID_SIZE);/*注冊設(shè)備*/device_register(&my_dev);/*創(chuàng)建屬性文件*/device_create_file(&my_dev, &dev_attr_dev);return ret;}static void my_device_exit(void){device_unregister(&my_dev);}module_init(my_device_init);module_exit(my_device_exit);
注冊一個(gè)bus_id即名字為my_dev的設(shè)備,該設(shè)備的bus成員指向上一步創(chuàng)建的my_bus_type總線,parent成員指向上一步創(chuàng)建的my_bus總線設(shè)備。
測試結(jié)果:
3.DRIVER
#include?
#include?
#include?
#include?
#include?
MODULE_AUTHOR("David?Xie");??
MODULE_LICENSE("Dual?BSD/GPL");??
extern?struct?bus_type?my_bus_type;??
static?int?my_probe(struct?device?*dev)??
{??
printk("Driver?found?device?which?my?driver?can?handle!\n");??
return?0;??
}??
static?int?my_remove(struct?device?*dev)??
{??
printk("Driver?found?device?unpluged!\n");??
return?0;??
}??
struct?device_driver?my_driver?=?{??
.name?=?"my_dev",??
.bus?=?&my_bus_type,??
.probe?=?my_probe,??
.remove?=?my_remove,??
};??
/*??
*?Export?a?simple?attribute.??
*/??
static?ssize_t?mydriver_show(struct?device_driver?*driver,?char?*buf)??
{??
return?sprintf(buf,?"%s\n",?"This?is?my?driver!");??
}??
static?DRIVER_ATTR(drv,?S_IRUGO,?mydriver_show,?NULL);??
static?int?__init?my_driver_init(void)??
{??
int?ret?=?0;??
/*注冊驅(qū)動(dòng)*/??
driver_register(&my_driver);??
/*創(chuàng)建屬性文件*/??
driver_create_file(&my_driver,?&driver_attr_drv);??
return?ret;???
}??
static?void?my_driver_exit(void)??
{??
driver_unregister(&my_driver);??
}??
module_init(my_driver_init);??
module_exit(my_driver_exit);??
#include #include #include #include #include MODULE_AUTHOR("David Xie");MODULE_LICENSE("Dual BSD/GPL");extern struct bus_type my_bus_type;static int my_probe(struct device *dev){printk("Driver found device which my driver can handle!\n");return 0;}static int my_remove(struct device *dev){printk("Driver found device unpluged!\n");return 0;}struct device_driver my_driver = {.name = "my_dev",.bus = &my_bus_type,.probe = my_probe,.remove= my_remove,};/** Export a simple attribute.*/static ssize_t mydriver_show(struct device_driver *driver, char *buf){return sprintf(buf, "%s\n", "This is my driver!");}static DRIVER_ATTR(drv, S_IRUGO, mydriver_show, NULL);static int __init my_driver_init(void){int ret = 0;/*注冊驅(qū)動(dòng)*/driver_register(&my_driver);/*創(chuàng)建屬性文件*/driver_create_file(&my_driver, &driver_attr_drv);return ret;}static void my_driver_exit(void){driver_unregister(&my_driver);}module_init(my_driver_init);module_exit(my_driver_exit);
創(chuàng)建一個(gè)名為“bus_dev”的驅(qū)動(dòng),并將bus成員指向第一步創(chuàng)建的my_bus_type總線
測試結(jié)果:
?
評論
查看更多