Show / Hide Table of Contents

Class UsbInterface

Inheritance
System.Object
UsbInterfaceBase
UsbInterface
Implements
IUsbInterface
System.IDisposable
Inherited Members
UsbInterfaceBase.Logger
UsbInterfaceBase.ReadBufferSize
UsbInterfaceBase.WriteBufferSize
UsbInterfaceBase.UsbInterfaceEndpoints
UsbInterfaceBase.ReadEndpoint
UsbInterfaceBase.WriteEndpoint
UsbInterfaceBase.InterruptWriteEndpoint
UsbInterfaceBase.InterruptReadEndpoint
UsbInterfaceBase.RegisterDefaultEndpoints()
UsbInterfaceBase.ClaimInterface()
UsbInterfaceBase.PerformControlTransferAsync(SetupPacket, Byte[], CancellationToken)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Device.Net.LibUsb
Assembly: Device.Net.LibUsb.dll
Syntax
public class UsbInterface : UsbInterfaceBase, IUsbInterface, IDisposable

Constructors

UsbInterface(UsbDevice, Byte, Nullable<UInt16>, Nullable<UInt16>, ILogger, Int32, Func<UsbDevice, SetupPacket, Byte[], Nullable<Int32>, Task<TransferResult>>)

Declaration
public UsbInterface(UsbDevice usbDevice, byte interfaceId, ushort? readBufferSize = null, ushort? writeBufferSize = null, ILogger logger = null, int timeout = 1000, Func<UsbDevice, SetupPacket, byte[], int?, Task<TransferResult>> performControlTransferAsync = null)
Parameters
Type Name Description
LibUsbDotNet.UsbDevice usbDevice
System.Byte interfaceId
System.Nullable<System.UInt16> readBufferSize
System.Nullable<System.UInt16> writeBufferSize
Microsoft.Extensions.Logging.ILogger logger
System.Int32 timeout
System.Func<LibUsbDotNet.UsbDevice, SetupPacket, System.Byte[], System.Nullable<System.Int32>, System.Threading.Tasks.Task<TransferResult>> performControlTransferAsync

Properties

InterfaceNumber

Declaration
public override byte InterfaceNumber { get; }
Property Value
Type Description
System.Byte
Overrides
UsbInterfaceBase.InterfaceNumber

Timeout

Declaration
public int Timeout { get; set; }
Property Value
Type Description
System.Int32

Methods

Dispose()

Declaration
public void Dispose()

ReadAsync(UInt32, CancellationToken)

Declaration
public Task<TransferResult> ReadAsync(uint bufferLength, CancellationToken cancellationToken)
Parameters
Type Name Description
System.UInt32 bufferLength
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task<TransferResult>

WriteAsync(Byte[], CancellationToken)

Declaration
public Task<uint> WriteAsync(byte[] data, CancellationToken cancellationToken)
Parameters
Type Name Description
System.Byte[] data
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task<System.UInt32>

Implements

IUsbInterface
System.IDisposable
In This Article
Back to top Generated by DocFX