USB HOST DRIVER V03 Freescale Semiconductor / Motorola, USB HOST DRIVER V03 Datasheet - Page 15

no-image

USB HOST DRIVER V03

Manufacturer Part Number
USB HOST DRIVER V03
Description
USB Host Driver v03
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
2.4.2.
MOTUSB registers ”Device Interface ID“ for every Device object it creates. The “Device
Interface ID” (henceforward “Device interface”) itself is a global unique identifier
(GUID). The MOTUSB Device Interface GUID is defined in the
#define GUID_CLASS_MOTUSB
{0x239d60c9, 0xccaf, 0x11d5,
{0xac, 0x21, 0x20, 0x4c, 0x4f, 0x4f, 0x50, 0x20}}
The operating system uses this GUID to generate a unique Device name for each Device
object in the system. By using such a Device naming scheme, the OS solves all Device
naming issues across the entire system.
2.4.3.
The OS provides enumeration of Devices by Device Interface ID with the Setup API
functions:
SetupDiGetClassDevs
SetupDiEnumDeviceInterfaces
and others
These functions require the Device Interface GUID, which can be found in
header file as a GUID_CLASS_MOTUSB definition constant. This GUID is shared
across all components based on MOTUSB, since each Device object created by
MOTUSB has the same Device Interface ID.
As
SetupDiEnumDeviceInterfaces
objects. In order to differentiate between the Devices an application should query the
Device descriptor or string descriptors. In this way, each Device instance can be
identified unambiguously.
For a detailed function description see Microsoft Platform SDK documentation.
Sample of Device enumeration:
#include <windows.h>
#include <dbt.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <setupapi.h>
#include "motioctl.h"
const GUID _GuidMotUSB = GUID_CLASS_MOTUSB;
HDEVINFO USBGetDeviceList()
{
M
HDEVINFO devInfo;
a
result
Device Interface ID.
Device Enumeration By Client.
of
PRELIMINARY—SUBJECT TO CHANGE WITHOUT NOTICE
Device
enumeration
, the Client application retrieves a list of all Device
Driver Model.
functions
SetupDiGetClassDevs
motioctl.h
\
header file.
motioctl.h
\
and
2-4

Related parts for USB HOST DRIVER V03