internal UsbEndpointReader(UsbDevice usbDevice, EndpointTypes epType, int packetSize, int mReadBufferSize, ReadEndpoints mReadEndpoint) : base(usbDevice, epType, packetSize) { this.mReadBufferSize = mReadBufferSize; this.mReadEndpoint = mReadEndpoint; }
/// <summary> /// Opens an endpoint for reading /// </summary> /// <param name="readEndpoint">Endpoint number for read operations.</param> /// <param name="readBufferSize">Size of the read buffer allocated for the <see cref="UsbEndpointReader.DataReceived"/> event.</param> /// <returns>A <see cref="UsbEndpointReader"/> class ready for reading. /// If the specified endpoint has allready been opened, the original <see cref="UsbEndpointReader"/> object will be returned. /// </returns> public UsbEndpointReader OpenInterruptEndpointReader(ReadEndpoints readEndpoint, int readBufferSize) { UsbEndpointReader epNew = new UsbEndpointReader(this, EndpointTypes.Interrupt, 0, readBufferSize, readEndpoint); return((UsbEndpointReader)mActiveEndpoints.Add(epNew)); }
/// <summary> /// Opens an endpoint for reading /// </summary> /// <param name="readEndpoint">Endpoint number for read operations.</param> /// <returns>A <see cref="UsbEndpointReader"/> class ready for reading. /// If the specified endpoint has allready been opened, the original <see cref="UsbEndpointReader"/> object will be returned. /// </returns> public UsbEndpointReader OpenInterruptEndpointReader(ReadEndpoints readEndpoint) { UsbEndpointReader epNew = new UsbEndpointReader(this, EndpointTypes.Interrupt, 0, UsbEndpointReader.DEF_READ_BUFFER_SIZE, readEndpoint); return((UsbEndpointReader)mActiveEndpoints.Add(epNew)); }
/// <summary> /// Opens an endpoint for reading /// </summary> /// <param name="readEndpoint">Endpoint number for read operations.</param> /// <param name="readBufferSize">Size of the read buffer allocated for the <see cref="UsbEndpointReader.DataReceived"/> event.</param> /// <param name="endPointType">One of the <see cref="EndpointTypes"/> enumerations.</param> /// <param name="packetSize">The packet size to use when endPointType is set to <see cref="EndpointTypes.Isochronous"/>.</param> /// <returns>A <see cref="UsbEndpointReader"/> class ready for reading. /// If the specified endpoint has allready been opened, the original <see cref="UsbEndpointReader"/> object will be returned. /// </returns> public UsbEndpointReader OpenEndpointReader(ReadEndpoints readEndpoint, int readBufferSize, EndpointTypes endPointType, int packetSize) { UsbEndpointReader epNew = new UsbEndpointReader(this, endPointType, packetSize, readBufferSize, readEndpoint); return((UsbEndpointReader)mActiveEndpoints.Add(epNew)); }