全部博文(2005)
分类:
2009-03-24 15:42:17
To track your progress in the following table, select the check box next to each step.
Clear | Step | Topic |
---|---|---|
1. Familiarize yourself with the code structure for Windows CE device drivers. | ||
2. Familiarize yourself with driver development for Windows CE. | Developing a Device Driver | |
3. If you have not already done so, in the Platform Builder integrated development environment (IDE), create an OS design. | ||
4. Copy the power management development sample driver to your
OS design.
For example, copy %_WINCEROOT%\Public\Common\Oak\Drivers\PM\Test\Devsample to %_WINCEROOT%\Platform\<your OS design>\drivers\<your driver name>. |
Not applicable | |
5. Rename the power management development sample driver files to names that correspond with the intended functionality of your driver. | Not applicable | |
6. Edit the TARGETNAME and SOURCES
values in the sources file for your driver to correspond with your new file
names. |
Not applicable | |
7. Add WINCEOEM=1 to the sources file for your
driver to allow your driver access to %_WINCEROOT%\Public. For more information
on sources files, see |
Not applicable | |
8. Modify the source code for your driver to implement the
correct stream interface functions.
The power management development sample includes support for the stream interface functions. The XXX prefix for these functions has been replaced with PDX. |
||
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. | ||
10. Modify the source code for your driver to implement the
correct power management functions for your driver.
Because you previously created your driver, proceed to step 2 in the corresponding topic. |
||
11. 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.
The sample .def file for the power management development sample driver is located at %_WINCEROOT%\Public\Common\Oak\Drivers\PM\Test\Devsample\Pmdevsample.def. For more information on the |
Not applicable | |
12. Add registry information for your driver to the Platform.reg
file for your OS design.
For example, you can add the following code example to the Platform.reg file to specify the correct registry information for your driver. #include "$(_winceroot)\platform\<your OS design>\drivers\<your driver name>\<your driver name>.reg" |
||
13. Modify the Platform.bib file for your OS design to include
your driver.
For example, you can add the following code example to the Modules section of the Platform.bib file to specify the correct location of your driver. MyDriver.dll $(_FLATRELEASEDIR)\<your driver name>.dll NK SH |
||
14. Edit the dirs file for your OS design to include your driver. | ||
15. From %_WINCEROOT%\Platform\<your OS design>\Drivers\<your driver name> in your OS design, build your driver. | Building a Device Driver from the Command Line | |
16. In the IDE, build your run-time image to include your driver. | ||
17. Debug the source code for your driver. | ||
18. Test your driver using the Windows CE Test Kit (CETK). |