internal static UsbEndpoint EndpointFactory(UsbInterface parent, Interop.UsbEndpointHandle handle) { Interop.TransferType transferType; handle.GetTransferType(out transferType).ThrowIfFailed("Failed to get transfer type from endpoint"); switch (transferType) { case Interop.TransferType.Bulk: return(new UsbBulkEndpoint(parent, handle)); case Interop.TransferType.Interrupt: return(new UsbInterruptEndpoint(parent, handle)); case Interop.TransferType.Isochronous: return(new UsbIsochronousEndpoint(parent, handle)); default: return(new UsbEndpoint(parent, handle)); } }
internal UsbInterruptEndpoint(UsbInterface parent, Interop.UsbEndpointHandle handle) : base(parent, handle) { }
internal UsbEndpoint(UsbInterface parent, Interop.UsbEndpointHandle handle) { _parent = parent; _handle = handle; }
internal UsbIsochronousEndpoint(UsbInterface parent, Interop.UsbEndpointHandle handle) : base(parent, handle) { }