Show / Hide Table of Contents

Class UsbInterfaceBase

Represents a USB interface

Inheritance
System.Object
UsbInterfaceBase
UsbInterface
UwpUsbInterface
WindowsUsbInterface
Inherited Members
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: Usb.Net
Assembly: Usb.Net.dll
Syntax
public abstract class UsbInterfaceBase

Constructors

UsbInterfaceBase(PerformControlTransferAsync, ILogger, Nullable<UInt16>, Nullable<UInt16>)

Declaration
protected UsbInterfaceBase(PerformControlTransferAsync performControlTransferAsync, ILogger logger = null, ushort? readBufferSize = null, ushort? writeBufferSize = null)
Parameters
Type Name Description
PerformControlTransferAsync performControlTransferAsync
Microsoft.Extensions.Logging.ILogger logger
System.Nullable<System.UInt16> readBufferSize
System.Nullable<System.UInt16> writeBufferSize

Properties

InterfaceNumber

Declaration
public abstract byte InterfaceNumber { get; }
Property Value
Type Description
System.Byte

InterruptReadEndpoint

Declaration
public IUsbInterfaceEndpoint InterruptReadEndpoint { get; set; }
Property Value
Type Description
IUsbInterfaceEndpoint

InterruptWriteEndpoint

Declaration
public IUsbInterfaceEndpoint InterruptWriteEndpoint { get; set; }
Property Value
Type Description
IUsbInterfaceEndpoint

Logger

Declaration
protected ILogger Logger { get; }
Property Value
Type Description
Microsoft.Extensions.Logging.ILogger

ReadBufferSize

Declaration
public ushort ReadBufferSize { get; }
Property Value
Type Description
System.UInt16

ReadEndpoint

Declaration
public IUsbInterfaceEndpoint ReadEndpoint { get; set; }
Property Value
Type Description
IUsbInterfaceEndpoint

UsbInterfaceEndpoints

Declaration
public IList<IUsbInterfaceEndpoint> UsbInterfaceEndpoints { get; }
Property Value
Type Description
System.Collections.Generic.IList<IUsbInterfaceEndpoint>

WriteBufferSize

Declaration
public ushort WriteBufferSize { get; }
Property Value
Type Description
System.UInt16

WriteEndpoint

Declaration
public IUsbInterfaceEndpoint WriteEndpoint { get; set; }
Property Value
Type Description
IUsbInterfaceEndpoint

Methods

ClaimInterface()

Note: some platforms require a call to be made to claim the interface. This is currently only for Android but may change

Declaration
public virtual async Task ClaimInterface()
Returns
Type Description
System.Threading.Tasks.Task

PerformControlTransferAsync(SetupPacket, Byte[], CancellationToken)

Declaration
public async Task<TransferResult> PerformControlTransferAsync(SetupPacket setupPacket, byte[] buffer, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
SetupPacket setupPacket
System.Byte[] buffer
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task<TransferResult>

RegisterDefaultEndpoints()

Declaration
public void RegisterDefaultEndpoints()
In This Article
Back to top Generated by DocFX