您的位置:首页 > 其它

Windows Embedded 开发之如何创建一个设备驱动(一般性描述)

2011-07-30 20:02 477 查看
How to Create a Device Driver 如何创建一个设备驱动

1. Familiarize yourself with the code structure for Windows Embedded CE device drivers.

熟悉WinCE设备驱动代码结构

2. Familiarize yourself with driver development for Windows Embedded CE.

熟悉WinCE驱动开发

3. If you have not already done so, in the Platform Builder integrated development environment (IDE), create an OS design.

在PB IDE中创建一个OS设计

4. Copy the power management development sample driver to your OS design.

复制电源管理开发样例驱动到你的OS设计

5. Rename the power management development sample driver files to names that correspond with the intended functionality of your driver.

重命名样例驱动的文件

6. Edit the TARGETNAME and SOURCES values in the sources file for your driver to correspond with your new file names.

在sources文件中编辑TARGETNAME和SOURCES的值

7. Add WINCEOEM=1 to the sources file for your driver to allow your driver access to %_WINCEROOT%\Public.

在sources文件中添加WINCEOEM=1

8. Modify the source code for your driver to implement the correct stream interface functions.

修改源代码以实现正确的流接口函数

9. If your driver requires functionality in addition to the functionality provided by the stream interface functions, you may choose to implement custom I/O control codes.

如果你的驱动需要除流接口函数提供的功能之外的功能,你可以选择实现自定义的I/O控制码

10. Verify that the entry points for your driver are exposed correctly. The functions should either be declared using a .def file or by using the extern "C" declarator.

证实你的驱动的入口点被正确地公开

11. Add registry information for your driver to the Platform.reg file for your OS design.

为你的驱动添加注册表信息到Platform.reg文件

12. Modify the Platform.bib file for your OS design to include your driver.

修改Platform.bib文件以包含你的驱动

13. Edit the dirs file for your OS design to include your driver.

编辑dirs文件以包含你的驱动

14. From %_WINCEROOT%\Platform\<your OS design>\Drivers\<your driver name> in your OS design, build your driver.

生成你的驱动

15. In the IDE, build your run-time image to include your driver.

在IDE中,生成你的运行时映像以包含你的驱动

16. Test your driver using the Windows Embedded CE 6.0 Test Kit (CETK).

测试你的驱动
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: