7.2. Developing a Driver Using the Enhanced Chipset Support

When developing a driver for a device based on one of the enhanced-support chipsets [7.1], you can use WinDriver's chipset-set specific support in the following manner: If your device is based on the Altera Qsys design or Xilinx BMD design, you can generate customized code for the device by selecting this option in the DriverWizard code generation options dialogue (see Section 4.2, Step 6.b). Alternatively, or if you are using another enhanced-support device, follow the steps below to use one the enhanced-support WinDriver samples as the starting point for your development:

  1. Locate the sample diagnostics program for your device under the WinDriver/chip_vendor/chip_name directory.

    Most of the sample diagnostics programs are named xxx_diag and their source code is normally found under an xxx_diag subdirectory. The program's executable is found under a subdirectory for your target operating system (e.g., WIN32 for Windows.)

  2. Run the custom diagnostics program to diagnose your device and familiarize yourself with the options provided by the sample program.
  3. Use the source code of the diagnostics program as your skeletal device driver and modify the code, as needed, to suit your specific development needs. When modifying the code, you can utilize the custom WinDriver API for your specific chip. The custom API is typically found under the WinDriver/chip_vendor/lib directory.
  4. If the user-mode driver application that you created by following the steps above contains parts that require enhanced performance (e.g., an interrupt handler), you can move the relevant portions of your code to a Kernel PlugIn driver for optimal performance, as explained in Chapter 11.