USB Initialization Calls
The client uses these calls to attach to the USB subsystem and, optionally, to claim a particular interface.
To . . . | Use this system call . . . |
---|---|
Wait for the USB stack to become available. | UsbSynchronize |
Find USB devices attached to the bus. | UsbFindFirstDevice, UsbFindNextDevice |
Find a matching entry in a table of device descriptions. | UsbMatchId |
Get a description of available USB devices. | UsbGetDeviceDesriptions |
Wait for attach and detach events. | UsbWaitForEvent |
Wait for attach and detach events and call a function. | UsbEventsWithCallback |
Claim a device and obtain a handle | UsbOpenDevice |
Close a device and release the handle | UsbCloseDevice |
USB Transfer Calls
These calls simplify standard control functions by avoiding having to allocate, fill, and submit a control URB in each case. They perform the standard set of USB control functions.
To . . . | Use this system call . . . |
---|---|
Create a control transfer and synchronously submit it, returning upon completion or time out | UsbControlXfer |
Create a bulk transfer and submit it synchronously, returning from the call upon completion or time out | UsbBulkXfer |
Create an interrupt transfer and submit it synchronously, returning from the call upon completion or time out | UsbInterruptXfer |
Create a bulk transfer and submit it asynchronously | UsbBulkXferAsync |
Create an interrupt transfer and submit it asynchronously | UsbInterruptXferAsync |
Cancel operations outstanding on a pipe | UsbCancelXfer |
Clear a stall condition on an endpoint | UsbClearStall |
Get the current status of an endpoint | UsbGetEndpointStatus |
Get the current status of a device | UsbGetDeviceStatus |
USB Configuration Calls
To . . . | Use this system call . . . |
---|---|
Return the descriptor of given type and index | UsbGetDescriptor |
Return the device descriptor for a given handle | UsbGetDeviceDescriptor |
Return the interface descriptor for a given handle | UsbGetInterfaceDescriptor |
Return the endpoint descriptor for the given interface handle and endpoint index | UsbGetEndpointDescriptor |
Return the number of endpoints for a given interface | UsbGetEndpointCount |
Return a configuration descriptor given a device handle | UsbGetConfigDescriptor |
Get the current configuration number of a given device | UsbGetConfiguration |
Create a control transfer and synchronously submit it, returning from the call when it completes or times out. | UsbSetConfiguration |
Set an alternative setting number of a given interface | UsbSetAltInterface |
Get the alternative setting number of a given interface | UsbGetAltInterface |
Get a string descriptor in UTF-16LE format | UsbGetLanguageString |
Get a string descriptor in ASCII format and US/English language ID | UsbGetAsciiString |
Misc USB Calls
To . . . | Use this system call . . . |
---|---|
Get a strng from USB error code | UsbGetErrorString |