コード例 #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));
            }
        }
コード例 #2
0
 internal UsbInterruptEndpoint(UsbInterface parent, Interop.UsbEndpointHandle handle) : base(parent, handle)
 {
 }
コード例 #3
0
 internal UsbEndpoint(UsbInterface parent, Interop.UsbEndpointHandle handle)
 {
     _parent = parent;
     _handle = handle;
 }
コード例 #4
0
 internal UsbIsochronousEndpoint(UsbInterface parent, Interop.UsbEndpointHandle handle) : base(parent, handle)
 {
 }