UsbClientControllerApiWrapper Class
Namespace: GHIElectronics.TinyCLR.Devices.UsbClient.Provider · Assembly: GHIElectronics.TinyCLR.Devices.UsbClient
No description available.
public class UsbClientControllerApiWrapper : IUsbClientControllerProvider
Constructors
UsbClientControllerApiWrapper(NativeApi api)
public UsbClientControllerApiWrapper(NativeApi api)
No description available.
| Parameter | Type | Description |
|---|---|---|
api | NativeApi |
Properties
Api
public NativeApi Api { get; }
The underlying native API descriptor. (inherited)
DeviceState
public DeviceState DeviceState { get; }
No description available.
WriteBufferSize
public extern int WriteBufferSize { get; set; }
Size in bytes of the transmit buffer. (inherited)
ReadBufferSize
public extern int ReadBufferSize { get; set; }
Size in bytes of the receive buffer. (inherited)
Methods
Dispose()
public void Dispose()
Releases buffered memory (the unmanaged firmware/application buffers). (inherited)
Dispose(bool disposing)
protected virtual void Dispose(bool disposing)
Closes a response stream, if present. (inherited)
| Parameter | Type | Description |
|---|---|---|
disposing | bool | Not used. |
BytesToRead(int streamIndex)
public int BytesToRead(int streamIndex)
No description available.
| Parameter | Type | Description |
|---|---|---|
streamIndex | int |
Returns int
BytesToWrite(int streamIndex)
public int BytesToWrite(int streamIndex)
No description available.
| Parameter | Type | Description |
|---|---|---|
streamIndex | int |
Returns int
Enable()
public extern void Enable()
Re-enables interrupts after a matching Disable. (inherited)
Disable()
public extern void Disable()
Disables interrupts on the current core. Always pair with Enable. (inherited)
SetActiveSetting(UsbClientSetting setting)
public extern void SetActiveSetting(UsbClientSetting setting)
No description available.
| Parameter | Type | Description |
|---|---|---|
setting | UsbClientSetting |
Read(int streamIndex, byte[] data, int offset, int count)
public extern int Read(int streamIndex, byte[] data, int offset, int count)
Captures a slice of inter-edge intervals after waiting for waitForState. (inherited)
| Parameter | Type | Description |
|---|---|---|
streamIndex | int | |
data | byte[] | |
offset | int | |
count | int |
Returns int
Write(int streamIndex, byte[] data, int offset, int count)
public extern int Write(int streamIndex, byte[] data, int offset, int count)
Writes length bytes; optional trailing break of breakDuration. (inherited)
| Parameter | Type | Description |
|---|---|---|
streamIndex | int | |
data | byte[] | |
offset | int | |
count | int |
Returns int
Flush(int streamIndex)
public extern void Flush(int streamIndex)
No description available.
| Parameter | Type | Description |
|---|---|---|
streamIndex | int |
ClearReadBuffer(int streamIndex)
public extern void ClearReadBuffer(int streamIndex)
No description available.
| Parameter | Type | Description |
|---|---|---|
streamIndex | int |
ClearWriteBuffer(int streamIndex)
public extern void ClearWriteBuffer(int streamIndex)
No description available.
| Parameter | Type | Description |
|---|---|---|
streamIndex | int |
GetControlPacketSize()
public extern int GetControlPacketSize()
No description available.
Returns int
GetEndpointMap()
public extern ushort GetEndpointMap()
No description available.
Returns ushort
SetDeviceDescriptor(Configuration.DeviceDescriptor[] deviceDescriptor)
public extern void SetDeviceDescriptor(Configuration.DeviceDescriptor[] deviceDescriptor)
No description available.
| Parameter | Type | Description |
|---|---|---|
deviceDescriptor | Configuration.DeviceDescriptor[] |
SetConfigurationDescriptor(Configuration.ConfigurationDescriptor[] configurationDescriptor)
public extern void SetConfigurationDescriptor(Configuration.ConfigurationDescriptor[] configurationDescriptor)
No description available.
| Parameter | Type | Description |
|---|---|---|
configurationDescriptor | Configuration.ConfigurationDescriptor[] |
SetStringDescriptor(Configuration.StringDescriptor[] stringDescriptor, uint index)
public extern void SetStringDescriptor(Configuration.StringDescriptor[] stringDescriptor, uint index)
No description available.
| Parameter | Type | Description |
|---|---|---|
stringDescriptor | Configuration.StringDescriptor[] | |
index | uint |
SetGenericDescriptor(Configuration.GenericDescriptor[] genericDescriptor)
public extern void SetGenericDescriptor(Configuration.GenericDescriptor[] genericDescriptor)
No description available.
| Parameter | Type | Description |
|---|---|---|
genericDescriptor | Configuration.GenericDescriptor[] |
Events
DataReceived
public event DataReceivedEventHandler DataReceived
Raised when receive data becomes available. (inherited)
DeviceStateChanged
public event DeviceStateChangedEventHandler DeviceStateChanged
No description available.