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

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.4.
The setup API function
Device
SP_DEVICE_INTERFACE_DETAIL_DATA structure parameter. Having this name
the Client application can open a handle to the Device object using the
Win32 API function.
After the application has received one or more handles for the Device, operations can be
performed on the Device by using a handle. If there is more than one handle to the same
Device, it makes no difference which handle is used in order to perform a certain
operation. All handles that are associated with the same Device behave in the same
manner.
Sample of establishing a Device connection function:
HANDLE
USBOpenDevice(
{
M
)
}
//
SetupDiDestroyDeviceInfoList(hDevInfo);
return 0;
HDEVINFO devList,
int
BOOL
DWORD
DWORD
SP_DEVICE_INTERFACE_DETAIL_DATA *InterfaceData;
SP_DEVICE_INTERFACE_DATA
HANDLE
DevData.cbSize = sizeof(SP_DEVICE_INTERFACE_DATA);
bOK = SetupDiEnumDeviceInterfaces(devList, NULL,
if ( !bOK ) {
}
// get length of the detailed information, allocate buffer
SetupDiGetDeviceInterfaceDetail(devList, &DevData,
InterfaceData = (SP_DEVICE_INTERFACE_DETAIL_DATA*) calloc(1, len);
if ( !InterfaceData )
// now get the detailed Device information
// Insert error handling here.
return 1;
Cleanup
return INVALID_HANDLE_VALUE;
return INVALID_HANDLE_VALUE;
Establishing Connection To Device.
name
devNum
(LPGUID)&_GuidMotUSB, devNum, &DevData );
PRELIMINARY—SUBJECT TO CHANGE WITHOUT NOTICE
in
SetupDiGetDeviceInterfaceDetail
the
Driver Model.
DevicePath
NULL, 0, &len, NULL);
bOK;
len;
Status;
DevData = {0};
hDevice = INVALID_HANDLE_VALUE;
member
application finds the
CreateFile
of
2-6
the

Related parts for USB HOST DRIVER V03