E.4.1 usbio object model, E.4.1.1 usbio device objects, E.4.1 – Motorola USB08 User Manual

Page 140: Usbio object model, E.4.1.1, Usbio device objects, Universal usb device driver (usbio)

Advertising
background image

Designer Reference Manual

USB08 Evaluation Board

140

Universal USB Device Driver (USBIO)

MOTOROLA

Universal USB Device Driver (USBIO)

E.4.1 USBIO Object Model

The USBIO device driver provides a communication model that consists
of device objects and pipe objects. The objects are created, destroyed,
and managed by the USBIO driver. An application can open handles to
device objects and bind these handles to pipe objects.

E.4.1.1 USBIO Device Objects

Each USBIO device object is associated with a physical USB device that
is connected to the USB. A device object is created by the USBIO driver
in response to an Add Device request from the Plug&Play Manager of
the operating system. The USBIO driver is able to handle multiple device
objects at the same time.

Each device object created by USBIO is registered with the operating
system by using a unique identifier (GUID, Globally Unique Identifier).
This identifier is called “Device Interface ID”. All device objects managed
by USBIO are identified by the same GUID.The GUID is defined in the
USBIO Setup Information (INF) file. Based on the GUID and an instance
number, the operating system generates a unique name for each device
object. This name should be considered as opaque by applications. It
should never be used directly or stored permanently.

It is possible to enumerate all the device objects associated with a
particular GUID by using functions provided by the Windows Setup API.
The Functions used for this purpose are:

SetupDiGetClassDevs()

SetupDiEnumDeviceInterfaces()

SetupDiGetDeviceInterfaceDetail()

The result of the enumeration process is a list of device objects currently
created by USBIO. Each of the USBIO device objects corresponds to a
device currently connected to the USB. For each device object an
opaque device name string is returned. This string can be passed to

CreateFile()

to open the device object.

A default Device Interface ID (GUID) is built into the USBIO driver. This
default ID is defined in USBIO_I.H. Each device object created by
USBIO is registered by using this default ID. The default Device

Advertising