Property | Type | Description | |
---|---|---|---|
ForceLibUsbWinBack | bool |
Property | Type | Description | |
---|---|---|---|
FireUsbError | void | ||
GetDeviceConfigs | List |
||
UsbDevice | System |
Method | Description | |
---|---|---|
Close ( ) : bool |
Closes the UsbDevice and disposes any ActiveEndpoints.
|
|
ControlTransfer ( |
Transmits control data over a default control endpoint.
|
|
ControlTransfer ( |
Transmits control data over a default control endpoint.
|
|
Exit ( ) : void |
De-initializes the USB driver. If this method is not called before the application exits, it can cause it to hang indefinitely. Calling this method multiple times will have no effect. |
|
GetAltInterfaceSetting ( byte interfaceID, byte &selectedAltInterfaceID ) : bool |
Gets the selected alternate interface of the specified interface.
|
|
GetConfiguration ( byte &config ) : bool |
Gets the USB devices active configuration value.
|
|
GetDescriptor ( byte descriptorType, byte index, short langId, |
Gets a descriptor from the device. See DescriptorType for more information.
|
|
GetDescriptor ( byte descriptorType, byte index, short langId, object buffer, int bufferLength, int &transferLength ) : bool |
Gets a descriptor from the device. See DescriptorType for more information.
|
|
GetLangIDs ( short &langIDs ) : bool |
Asking for the zero'th index is special - it returns a string descriptor that contains all the language IDs supported by the device. Typically there aren't many - often only one. The language IDs are 16 bit numbers, and they start at the third byte in the descriptor. See USB 2.0 specification, section 9.6.7, for more information on this.
|
|
GetString ( string &stringData, short langId, byte stringIndex ) : bool |
Gets a DescriptorType.String descriptor from the device.
|
|
Open ( ) : bool |
Opens the USB device handle.
|
|
OpenEndpointReader ( ReadEndpointID readEndpointID ) : |
Opens a EndpointType.Bulk endpoint for reading
|
|
OpenEndpointReader ( ReadEndpointID readEndpointID, int readBufferSize ) : |
Opens a EndpointType.Bulk endpoint for reading
|
|
OpenEndpointReader ( ReadEndpointID readEndpointID, int readBufferSize, EndpointType endpointType ) : |
Opens an endpoint for reading
|
|
OpenEndpointWriter ( WriteEndpointID writeEndpointID ) : |
Opens a EndpointType.Bulk endpoint for writing
|
|
OpenEndpointWriter ( WriteEndpointID writeEndpointID, EndpointType endpointType ) : |
Opens an endpoint for writing
|
|
OpenUsbDevice ( Predicate |
Opens the usb device that matches the find predicate.
|
|
OpenUsbDevice ( |
Opens the usb device that matches the UsbDeviceFinder.
|
|
OpenUsbDevice ( System.Guid &devInterfaceGuid, |
Opens a WinUsb device by its DeviceInterfaceGUID. This is the Microsoft-recommended way for opening a WinUsb device. LibUsb device can be opened in this way as well. In order to open LibUsb devices in this manner, an entry must be added to the driver inf file: [Install.HW] Addreg=Add_LibUsb_Guid_Reg [Add_LibUsb_Guid_Reg] HKR,,LibUsbInterfaceGUIDs,0x10000,"{Your-Unique-Guid-String}" |
Method | Description | |
---|---|---|
FireUsbError ( object sender, |
||
GetDeviceConfigs ( |
||
UsbDevice ( |
public ControlTransfer ( |
||
setupPacket | An 8-byte setup packet which contains parameters for the control request. /// See section 9.3 USB Device Requests of the Universal Serial Bus Specification Revision 2.0 for more information. | |
buffer | Data to be sent/received from the device. | |
bufferLength | int | Length of the buffer param. |
lengthTransferred | int | Number of bytes sent or received (depends on the direction of the control transfer). |
return | bool |
public ControlTransfer ( |
||
setupPacket | An 8-byte setup packet which contains parameters for the control request. /// See section 9.3 USB Device Requests of the Universal Serial Bus Specification Revision 2.0 for more information. | |
buffer | object | Data to be sent/received from the device. |
bufferLength | int | Length of the buffer param. |
lengthTransferred | int | Number of bytes sent or received (depends on the direction of the control transfer). |
return | bool |
public GetAltInterfaceSetting ( byte interfaceID, byte &selectedAltInterfaceID ) : bool | ||
interfaceID | byte | The interface settings number (index) to retrieve the selected alternate interface setting for. |
selectedAltInterfaceID | byte | The alternate interface setting selected for use with the specified interface. |
return | bool |
public GetConfiguration ( byte &config ) : bool | ||
config | byte | The active configuration value. A zero value means the device is not configured and a non-zero value indicates the device is configured. |
return | bool |
public GetDescriptor ( byte descriptorType, byte index, short langId, |
||
descriptorType | byte | The descriptor type ID to retrieve; this is usually one of the |
index | byte | Descriptor index. |
langId | short | Descriptor language id. |
buffer | Memory to store the returned descriptor in. | |
bufferLength | int | Length of the buffer parameter in bytes. |
transferLength | int | The number of bytes transferred to buffer upon success. |
return | bool |
public GetDescriptor ( byte descriptorType, byte index, short langId, object buffer, int bufferLength, int &transferLength ) : bool | ||
descriptorType | byte | The descriptor type ID to retrieve; this is usually one of the |
index | byte | Descriptor index. |
langId | short | Descriptor language id. |
buffer | object | Memory to store the returned descriptor in. |
bufferLength | int | Length of the buffer parameter in bytes. |
transferLength | int | The number of bytes transferred to buffer upon success. |
return | bool |
public GetString ( string &stringData, short langId, byte stringIndex ) : bool | ||
stringData | string | Buffer to store the returned string in upon success. |
langId | short | The language ID to retrieve the string in. (0x409 for english). |
stringIndex | byte | The string index to retrieve. |
return | bool |
public OpenEndpointReader ( ReadEndpointID readEndpointID ) : |
||
readEndpointID | ReadEndpointID | Endpoint number for read operations. |
return |
public OpenEndpointReader ( ReadEndpointID readEndpointID, int readBufferSize ) : |
||
readEndpointID | ReadEndpointID | Endpoint number for read operations. |
readBufferSize | int | Size of the read buffer allocated for the |
return |
public OpenEndpointReader ( ReadEndpointID readEndpointID, int readBufferSize, EndpointType endpointType ) : |
||
readEndpointID | ReadEndpointID | Endpoint number for read operations. |
readBufferSize | int | Size of the read buffer allocated for the |
endpointType | EndpointType | The type of endpoint to open. |
return |
public OpenEndpointWriter ( WriteEndpointID writeEndpointID ) : |
||
writeEndpointID | WriteEndpointID | Endpoint number for read operations. |
return |
public OpenEndpointWriter ( WriteEndpointID writeEndpointID, EndpointType endpointType ) : |
||
writeEndpointID | WriteEndpointID | Endpoint number for read operations. |
endpointType | EndpointType | The type of endpoint to open. |
return |
public static OpenUsbDevice ( Predicate |
||
findDevicePredicate | Predicate |
The predicate function used to find the usb device. |
return |
public static OpenUsbDevice ( |
||
usbDeviceFinder | The |
|
return |
public static OpenUsbDevice ( System.Guid &devInterfaceGuid, |
||
devInterfaceGuid | System.Guid | Device Interface GUID of the usb device to open. |
usbDevice | On success, a new |
|
return | bool |