Preliminary User Guide, Rev. 2 |
|
February 1999 | USB Device Driver |
|
|
2 Initialization
■The driver entry routine is called and initializes callbacks for the following functions when the operating system loads the driver:
— Create: | Open a handle to a device instance. |
— Read: | Read a block of data from the Bulk In pipe. |
— Write: | Write a block of data to the Bulk Out pipe. |
— DeviceIoControl: | Process I/O requests documented in Section 4 of this document. |
— Close: | Close the handle of the device instance. |
■A symbolic link will be created associating this device driver with a special device instance that can be used to call IOCTL_GET_DEVICE_INSTANCES (i.e., LPTUSB). (See Section 4.13 of this document.)
■The Add_Device routine is called by the configuration manager. The configuration manager interacts with the USB bus enumerator to identify newly attached devices in the system. Through the layered driver architecture with the host controller driver, this
3 I/O File Functions
This section provides instructions on how to use the I/O file functions to interface with the
Function | Description |
|
|
CreateFile | Open an instance of a particular device. |
|
|
ReadFile | Reads data from the Bulk In pipe. |
|
|
WriteFile | Write data to the Bulk Out pipe. |
|
|
DeviceIoControl | Send a control code to a device instance. |
|
|
CloseHandle | Close an instance of a device. |
|
|
Lucent Technologies Inc. |