Jump to content

Using Your DDK

From EDM2
Revision as of 17:20, 8 November 2014 by Martini (talk | contribs) (Created page with "By IBM '''Reprint Courtesy of International Business Machines Corporation, © International Business Machines Corporation''' ==USB Device Driver Sample== ===Driver Desc...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

By IBM

Reprint Courtesy of International Business Machines Corporation, © International Business Machines Corporation

USB Device Driver Sample

Driver Description:

The Universal Serial Bus (USB) device driver sample contains source code for USB device drivers and installation protocols. The code includes the base USB device driver stack and the following drivers:

  • Keyboard
  • Mouse
  • Modem
  • Digital audio

Compilers/Assemblers Required:

  • Microsoft MASM 5.1 (supplied with the DDK)
  • Microsoft C 6.0

Build Instructions:

1.Set the environment variables so the correct tools are picked up during the build.

e.g., SET PATH=<drive>:\DDK\TOOLS;%PATH%

Where <drive> represents your DDK installed drive and DDK represents the DDK installed directory. On the CD-ROM, the TOOLS directory path is \DDK\ TOOLS.

2.Before the FIRST build is attempted, run (only once) the COPYC60.CMD REXX command file in the \DDK\TOOLS directory. This command copies the set of needed files from your copy of the Microsoft C 6.0 compiler to the proper directories under the DDK base directory.

e.g., COPYC60 <MSCdrive>:\'MSC60' <drive>:\DDK

Where <MSCdrive> represents the Microsoft C installed drive and "MSC60" represents the Microsoft C installed directory, <drive> represents your DDK installed drive and DDK represents the DDK installed directory.

3.To ensure the device driver gets created properly on a FAT file system, type SET LANG=US at an OS/2 command prompt before invoking NMAKE.

To build all the USB device drivers:

1.Change the directory to \DDK\BASE\SRC\DEV\USB.

2.Invoke NMAKE on the resident makefile.

To build an individual USB device driver:

1.Change the directory to \DDK\BASE\SRC\DEV\MOUSE\USB.

2.Change to the directory of the desired USB device driver.

3.Invoke NMAKE on the resident makefile.

Files Created by Successful Build:

Directory: \DDK\BASE\SRC\DEV\USB\USBD

  • USBD.SYS

Directory: \DDK\BASE\SRC\DEV\USB\UHCI

  • USBUHCD.SYS
  • USBUHCD2.SYS

Directory: \DDK\BASE\SRC\DEV\USB\HID

  • USBHID.SYS

Directory: \DDK\BASE\SRC\DEV\USB\USBMOUSE

  • USBMOUSE.SYS

Directory: \DDK\BASE\SRC\DEV\USB\USBKBD

  • USBKBD.SYS

Directory: \DDK\BASE\SRC\DEV\USB\USBAUDIO

  • USBAUDIO.SYS

Directory: \DDK\BASE\SRC\DEV\USB\USBCOM

  • USBCOM.SYS