摘要
USB枚举程序是USB设备固件程序的基础和核心,主要针对USB设备驱动的这一核心进行了研究。使用LeCroyUSB总线分析仪捕获了USB接口扫描枪总线处理过程图,通过解析此图从而详细分析了主机对USB设备枚举的全过程。并针对主机在枚举过程中每个不同请求,主要设计了设备如何响应这些请求的枚举代码框架,即枚举类,包括Set_Address、Get_Descriptor、Get_Status、Set_Configuration等设备响应主机请求时进行的操作。与此同时,也分析了一些枚举出错的案例及可用解决方法。
In a USB driver program, enumeration is the basic and most important part. For this problem, with the help of the picture caught by LeCroy which can catch the bus process for USB, a detailed analysis of the host’s enumeration process to USB devices has been given. And for the host’s different requests in the enumeration, an enumeration class including a lot of methods for USB devices is designed to correspond to the host. For example, the methods of set_address 、get_descriptor、get_status and set_configuration are presented. Also some enumeration error cases with their way to be resolved are presented.
作者
钱豪
QIAN Hao (Department of Software Engineering, Tongji University, Shanghai 201804, China)
出处
《电脑知识与技术》
2010年第7期5269-5272,共4页
Computer Knowledge and Technology
关键词
USB
枚举
枚举代码
枚举出错
总线处理
USB
enumeration
enumeration class
enumeration error
enumeration process