Class UsbInterface
Definition
- Assembly:
- Tizen.System.Usb.dll
A class to manage the USB interfaces.
C#Copypublic class UsbInterface
- Inheritance
-
objectUsbInterface
Properties
View Source
AlternateSetting
Sets an alternative setting. Use the index of a new alternative setting for a given interface.
Declaration
C#Copypublic int AlternateSetting { set; }
Property Value
| Type | Description |
|---|---|
| int |
View Source
Endpoints
A dictionary for mapping the endpoint IDs to endpoint instances for a given interface.
Declaration
C#Copypublic IReadOnlyDictionary<int, UsbEndpoint> Endpoints { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IReadOnlyDictionary<TKey, TValue><int, UsbEndpoint> |
Declaration
C#Copypublic int Id { get; }
Property Value
| Type | Description |
|---|---|
| int |
Methods
View Source
Claim(bool)
Claims the interface on a device. The interface must be claimed first to perform I/O operations.
Declaration
C#Copypublic void Claim(bool force)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | force | Set to true to auto detach the kernel driver, false otherwise. |
Exceptions
| Type | Condition |
|---|---|
| System.InvalidOperationException | Throws an exception if the device is disconnected, or not opened for an operation, or another program or driver has claimed the interface. |
Declaration
C#Copypublic string InterfaceString()
Returns
| Type | Description |
|---|---|
| string |
Declaration
C#Copypublic void Release()
Exceptions
| Type | Condition |
|---|---|
| System.InvalidOperationException | Throws an exception if the device is disconnected or not opened for an operation. |
| System.UnauthorizedAccessException | Throws an exception if the user has insufficient permission on the device. |