mjq_nju
驱动牛犊
驱动牛犊
  • 注册日期2004-07-06
  • 最后登录2004-12-13
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:1100回复:2

做驱动开发的需要了解如何与下层硬件以及上层应用程序打交道吗?

楼主#
更多 发布于:2004-07-17 09:33
本人被老板分配做usb驱动开发,但对驱动程序如何与下层硬件以及上层应用程序打交道根本不清楚。如做硬件的会问我:“我的setup包是如何来跟你通信的?”,做应用程序开发的会问及你的GUID是如何生成的?我现在真是一筹莫展,请斑竹指点一下。谢谢!
做驱动开发的需要了解如何与下层硬件以及上层应用程序打交道吗?
jameswaf
驱动牛犊
驱动牛犊
  • 注册日期2004-07-17
  • 最后登录2004-12-16
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2004-07-17 11:39
写driver一般情况下不需要,反而写固件的倒是要对driver了解比较多,这样效率会提高很多,做硬件的也会比较明白
windrv
驱动牛犊
驱动牛犊
  • 注册日期2004-07-05
  • 最后登录2004-07-28
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
板凳#
发布于: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.
游客

返回顶部