Exemplo n.º 1
0
        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));
            }
        }
Exemplo n.º 2
0
 internal UsbInterruptEndpoint(UsbInterface parent, Interop.UsbEndpointHandle handle) : base(parent, handle)
 {
 }
Exemplo n.º 3
0
 internal UsbEndpoint(UsbInterface parent, Interop.UsbEndpointHandle handle)
 {
     _parent = parent;
     _handle = handle;
 }
Exemplo n.º 4
0
 internal UsbIsochronousEndpoint(UsbInterface parent, Interop.UsbEndpointHandle handle) : base(parent, handle)
 {
 }