Property | Type | Description | |
---|---|---|---|
GetConfigs | ErrorCode | ||
MonoUsbDevice | System | ||
RefreshProfileList | int |
Method | Description | |
---|---|---|
ClaimInterface ( int interfaceID ) : bool |
Claims the specified interface of the device.
|
|
Close ( ) : bool |
Closes the UsbDevice and disposes any UsbDevice.ActiveEndpoints.
|
|
ControlTransfer ( |
Transmits control data over a default control endpoint.
|
|
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.
|
|
Init ( ) : void |
Initializes the MonoUsbEventHandler.SessionHandle with MonoUsbEventHandler.Init() and starts the static handle events thread with MonoUsbEventHandler.Start. This is done automatically when needed. Usually there is no need to call this functions externally. |
|
Open ( ) : bool |
Opens the USB device handle.
|
|
OpenEndpointReader ( ReadEndpointID readEndpointID, int readBufferSize, EndpointType endpointType ) : UsbEndpointReader |
Opens an endpoint for reading
|
|
OpenEndpointWriter ( WriteEndpointID writeEndpointID, EndpointType endpointType ) : UsbEndpointWriter |
Opens an endpoint for writing
|
|
ReleaseInterface ( int interfaceID ) : bool |
Releases an interface that was previously claimed with ClaimInterface.
|
|
ResetDevice ( ) : bool |
Sends a usb device reset command. After calling ResetDevice, the MonoUsbDevice instance is disposed and no longer usable. A new MonoUsbDevice instance must be obtained from the device list. |
|
SetAltInterface ( int alternateID ) : bool |
Sets an alternate interface for the most recent claimed interface.
|
|
SetConfiguration ( byte config ) : bool |
Sets the USB devices active configuration value. A USB device can have several different configurations, but only one active configuration. |
Method | Description | |
---|---|---|
GetConfigs ( |
||
MonoUsbDevice ( |
||
RefreshProfileList ( ) : int |
public ClaimInterface ( int interfaceID ) : bool | ||
interfaceID | int | The interface to claim. |
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 | 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 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 OpenEndpointReader ( ReadEndpointID readEndpointID, int readBufferSize, EndpointType endpointType ) : UsbEndpointReader | ||
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 | UsbEndpointReader |
public OpenEndpointWriter ( WriteEndpointID writeEndpointID, EndpointType endpointType ) : UsbEndpointWriter | ||
writeEndpointID | WriteEndpointID | Endpoint number for read operations. |
endpointType | EndpointType | The type of endpoint to open. |
return | UsbEndpointWriter |
public ReleaseInterface ( int interfaceID ) : bool | ||
interfaceID | int | The interface to release. |
return | bool |
public SetAltInterface ( int alternateID ) : bool | ||
alternateID | int | The alternate interface to select for the most recent claimed interface See |
return | bool |
public SetConfiguration ( 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 |