CH372是一种简单、易用的USB总线接口芯片,已在数据采集系统中得到广泛应用,由于没有WinCE下的驱动程序,给应用开发带来了一定的困难。文中提出了WinCE下此类USB设备驱动程序的一种设计方法,阐述了WinCE流接口驱动模型、USB流接口驱动程序的设计和CH372设备驱动程序的实现细节,并重点描述了驱动程序的入口点函数的功能与代码实现,最后分析了驱动程序的加载调用过程。通过在ARM9平台上测试表明:该驱动运行稳定,完全可以移植到具体的嵌入式产品中。
CH372 is a kind of USB interface chip, which is easy to use and widely used in data acquisition system. However, the driver program under WinCE system is not available at present, which brings many difficulties in application. Focused on researching entry function and code implementation of the driver, deeply analyzing load process of the driver program, this paper presented a design method of USB device driver under WinCE system. The paper described the realization details of WinCE stream interface driver model and USB stream interface driver design as well as CH372 devices driver program. Finally, the test result of ARM9 platform shows that this driver runs steadily and can be transplanted into real embedded products completely.