How to add a new driver under Wince7

Source: Internet
Author: User

To add a new driver in Wince7: (Take a simple led driver as an example)

1 . Right-click the Platform\zynq7000\src\drivers directory in the Solution Explorer window and select Add->new Sources subproject, In the pop-Up Subproject wizard dialog box, select the WCE dynamic-link Library and set the subproject name to the LED. Click Next and select an empty subproject, click Next and select Add to the current Dirs file. This allows you to create a new LED driver directory under the drivers directory.

2 . In the Solution Explorer window, you can see the newly created led catalog, under which the Include files and source files directories can be added to the header files and sources. Here, add the led.h and LED.C files separately. As shown below:

This allows you to add the required driver code to the LED.C. Here are a few functions that should be required:

3. Add the following code to the Led.def:

LIBRARY ledexportsLed_initLed_deinitLed_openLed_closeLed_powerupLed_powerdownLed_iocontrol

4 . Right-click on the LED catalog to open the Properties dialog box. The settings in this dialog box are actually equivalent to the modification of the sources file. Here you can set the warning level, the dynamic library name, and so on, as shown below.


5. Create a new registry file Led.reg in the LED directory and enter the following code:

[hkey_local_machine\drivers\builtin\led]"Prefix" = "LED""Dll" = "Led.dll""Order" = "1"

6 . Add the Platform.bib file modules area in the parameter files directory

Led.dll $ (_flatreleasedir) \led.dll NK SHK

7 . Add the Platform.reg file in the parameter files directory

#include "$ (_targetplatroot) \src\drivers\led\led.reg"

8. Sysgen recompile once NK

How to add a new driver under Wince7

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.