Pipe Class
Namespace: GHIElectronics.TinyCLR.Devices.UsbHost · Assembly: GHIElectronics.TinyCLR.Devices.UsbHost
A USB communication pipe.
public class Pipe : IDisposable
Properties
Endpoint
public Descriptors.Endpoint Endpoint { get; set; }
Endpoint associated with this pipe.
Methods
Transfer(byte[] buffer)
public int Transfer(byte[] buffer)
Transfers data to/from the endpoint.
| Parameter | Type | Description |
|---|---|---|
buffer | byte[] | The transfer buffer. |
Returns int — The number of bytes successfully transferred.
Transfer(byte[] buffer, int offset, int count)
public int Transfer(byte[] buffer, int offset, int count)
Transfers data to/from the endpoint.
| Parameter | Type | Description |
|---|---|---|
buffer | byte[] | The transfer buffer. |
offset | int | The offset into the buffer. |
count | int | The amount to transfer starting at offset from the buffer. |
Returns int — The number of bytes successfully transferred.
Dispose()
public void Dispose()
Disconnects and disposes the device.
Dispose(bool disposing)
protected virtual void Dispose(bool disposing)
Disconnects and disposes the device.
| Parameter | Type | Description |
|---|---|---|
disposing | bool | Whether or not this is called from Dispose. |