E.4.1.2 usbio pipe objects, E.4.1.2, Usbio pipe objects – Motorola USB08 User Manual

Page 142: Universal usb device driver (usbio)

Advertising
background image

Designer Reference Manual

USB08 Evaluation Board

142

Universal USB Device Driver (USBIO)

MOTOROLA

Universal USB Device Driver (USBIO)

to ensure compatibility USBIO still supports the old naming scheme.
This feature can be enabled by defining a device name prefix in the
variable

USBIO_DeviceBaseName

in the USBIO INF file. However, it is

strongly recommended to use the new naming scheme based on Device
Interface IDs (GUIDs), because it conforms with current Windows 2000
guidelines. The old-style static names should only be used if
backward-compatibility with former versions of USBIO is required.

E.4.1.2 USBIO Pipe Objects

The USBIO driver uses pipe objects to represent an active endpoint of
the device. The pipe objects are crated when the deice configuration is
set. The number and type of created pipe objects depend on the
selected configuration. The USBIO driver does not control the default
endpoint (endpoint zero) of a device. This endpoint is owned by the USB
bus driver USBD. Because of that, there is no pipe object for endpoint
zero and there are no pipe objects available until the device is
configured.

In order to access a pipe the application has to create a handle by
opening the device object as described above and attach it to a pipe.
This operation is called “bind”. After a binding is successfully established
the application can use the handle to communicate with the endpoint
that the pipe object represents. Each pipe maybe bound only once, and
a handle may be bound to one pipe only. So there is always an
one-to-one relation of pipe handles and pipe objects. This means that
the application has to create a separate handle for each pipe it wants to
access.

The USBIO driver also supports an “unbind” operation. That is used to
delete a binding between a handle and a pipe. After an unbind is
performed the handle may be reused to bind another pipe object and the
pipe object can be used to establish a binding with another handle.

The following example is intended to explain the relationships described
above. In

Figure E-2

a configuration is shown where one device object

and two associated pipe objects exist within the USBIO data base.

Advertising