阅读:1100回复:2
做驱动开发的需要了解如何与下层硬件以及上层应用程序打交道吗?
本人被老板分配做usb驱动开发,但对驱动程序如何与下层硬件以及上层应用程序打交道根本不清楚。如做硬件的会问我:“我的setup包是如何来跟你通信的?”,做应用程序开发的会问及你的GUID是如何生成的?我现在真是一筹莫展,请斑竹指点一下。谢谢!
做驱动开发的需要了解如何与下层硬件以及上层应用程序打交道吗? |
|
沙发#
发布于:2004-07-17 11:39
写driver一般情况下不需要,反而写固件的倒是要对driver了解比较多,这样效率会提高很多,做硬件的也会比较明白
|
|
板凳#
发布于:2004-07-17 10:37
Certainly. If you wish to develop a usb driver, you must learn how to interface with usb device and application.
To usb device, driver builds IRP and passes URB to lower level usb bus driver to read/write data from usb device. To application, driver gets involved when application calls CreateFile(), ReadFile(), WriteFile() and DeviceIoControl() with a device handle.Here, DeviceIoControl() is much useful, you can define your own DeviceIoControl codes for your special purpose such as reading/writing data to pipes. Besides, usb driver must take care of pnp requests from I/O manager, driver loading and unloading routines, power management, etc. For a beginner, it is really a little complicated. You can read a usb driver samples from DDK and learn the usb driver mainframe. Also, DriverStudio is a powerful tool which can generate most of usb driver routines and help you to deal with these hard stuffs. |
|