Lucent Technologies USS-720 manual Initialization, O File Functions, USB Device Driver

Page 61

Preliminary User Guide, Rev. 2

USS-720

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 USS-720 routine will be called when a USS-720 device is identified. After the device object has been successfully created, symbolic links will be created associating this device driver with the specific device instances (i.e., LPTUSB1, LPTUSB2, LPTUSBx).

3 I/O File Functions

This section provides instructions on how to use the I/O file functions to interface with the USS-720. Only parame- ters relative to the USS-720 Device Driver are explained in this document. Please refer to the Win32 SDK docu- mentation for the complete definitions of the following functions and all referenced data types:

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.

7-3

Image 61
Contents Information Manual, Rev September IntroductionTable of Contents September USB-to-IEEE Bridge Information Manual, Rev Evaluation Kit for USS-720IOCTL1284 Terminate USS-720 USB Device Driver Preliminary User GuideIOCTLSET1284REGISTER USS-720 USB Port Monitor Application Note Evaluation Kit Contents \SAMPLES Hardware RequirementsGetting Started Instructions OSR2.1 Cable Installation InstructionsWindows 98 Cable Installation Instructions Software UpdatesPlug and Play USB Driver and Port MonitorPort Creation Eeprom Lucent Technologies Inc In-System Design, Inc Lucent Technologies Microelectronics GroupUSB Applications Support September USS-720 Driver Software Object Code License Agreement Evaluation Kit SoftwareFebruary IntroductionLicensed Software USS-720 Software Use Agreement FebruaryFurnishing of Licensed Software OwnershipFebruary Software Use Agreement USS-720Agreement Prevails Warranty and IndemnityNothing Construed 04 ConfidentialityNonassignability PublicityAddresses IntegrationDisputes Applicable LawUSS720.INF USS720.SYSDocumentation USS-720 Software Use Agreement February Application Note, Rev February Software ComponentsPlug and Play Operation PnP Customer-Defined DataPrinter Enumeration Installation Process Power ManagementOperating Systems Supported USB Hardware Types SupportedPrint Types Supported Printer Types SupportedPreliminary Data Sheet, Rev September FeaturesDescription Table of Contents Pin Information Preliminary Data Sheet, Rev USS-720USB-to-IEEE Parallel Port nSelectIn Signal Active-Low Parallel Port nAutoFd Signal Active-LowParallel Port nInit Signal Active-Low Parallel Port nAck Signal Active-LowUSB Port OverviewDevice Descriptor, Configurations, and Inter- faces Descriptor LocationsOnboard Device Descriptor USB-to- Ieee 1284 Bridge SeptemberDevice Descriptor Offset Field Size Value Description Configuration Descriptor USB-to- IeeeBulk Out Endpoint Descriptor, I0A0E1 Interface DescriptorsBulk Out Endpoint Descriptor, I0A1E1 September USB-to-IEEE1284 BridgeBulk In Endpoint Descriptor, I0A1E2 Bulk In Endpoint Descriptor, I0A2E2 Bulk Out Endpoint Descriptor, I0A2E1Interrupt Endpoint Descriptor, I0A2E3 Requests PipesStandard Requests Get Port Status Data Bit Description Printer Class-Specific RequestsGET1284REGISTER Vendor-Specific RequestsSET1284REGISTER Register-Based Operation Ieee 1284 PortGET1284REGISTER Data Byte Register Data RegistersInterrupt Pipe Read Data Byte Register DataDefault Bit Symbol Bit Description Status Register Address Bit SymbolParallel Port nFault Signal Reserved Access Default Bit Symbol Bit Description Control Register Address Bit SymbolParallel Port nInit Signal USB-to-IEEE1284 BridgeUSS-720Instant USB ECP Command Register Address Bit Symbol Access Mode20 Description Extended Control Register Address Bit SymbolUSS-720 Control Register Address Bit Symbol USS-720 Setup Register Address Bit Symbol Interrupts External Crystal Connection External Circuitry RequirementsHigh Drive Mode Filter Bypass ModeSelf-Powered Mode Absolute Maximum Ratings Parameter Symbol Min UnitParameter Symbol Test Conditions Min Typ Max Unit Electrical CharacteristicsCapacitance Values Parameter Unit Clklo ClkhiSetup and Hold Input Timing Parameter Timing CharacteristicsOutput Delay Timing Parameter Min Max Unit Ordering Information Outline DiagramPin Mqfp Device Code Package ComcodeApplication Note February Description Port ParallelBridging USB to Typical Circuit Showing USSLucent Technologies Inc Preliminary User Guide, Rev February Signal DirectionsIOCTL1284 Setmode O File Functions InitializationPreliminary User Guide, Rev USS-720 February USB Device DriverCreateFile ReadFile Error CodesWriteFile DeviceIoControl CloseHandle Control Code Description O Control CodesParameters IOCTL1284 EcpfwdtorevIOCTL1284ECPREVTOFWD IOCTL1284 Ecpsetchannel IOCTL1284 Setmode Register Mode DescriptionIOCTL1284 Terminate Value Description IoctlabortpipeBulkoutpipe BulkinpipeIoctlcancelpiperequest IOCTLGET1284REGISTER ALTINTERFACE0 IoctlgetaltsettingALTINTERFACE1 ALTINTERFACE2Ioctlgetcapabilities Ioctlgetconfigurationdescriptor Ioctlgetdevicedescriptor Ioctlgetdeviceinstances Ioctlgetinterface Bit Meaning IoctlgetportstatusCommand Description IOCTLISSUEUSS720COMMANDByte Description IoctlreadinterruptpipeIoctlresetpipe IOCTLSET1284REGISTER Ioctlsetaltsetting Ioctlsoftreset Deviceinstanceheader O Control Data StructuresDeviceinstance Data StructureREGISTER1284, *PREGISTER1284 REGISTER1284ADVREGISTER1284, *PADVREGISTER1284 ADVREGISTER1284Lucent Technologies Inc USS-720 USB Port Monitor Printer Cable with Instant USB USS-720 Application Note USB Port Monitor FebruaryW98USS720EvalKit2402.zip to download the installation files Software Installation InstructionsApplication Note June Click on Enter LibrarySeptember MN99-052CMPR-1 Replaces MN97-061CMPR-04