You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+28Lines changed: 28 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,34 @@
14
14
15
15
## Usage
16
16
17
+
### USB Stream
18
+
19
+
`UsbStream` class provides a seamless interface to a stream that can read from and write to an USB Device that's enumerated as a WinUSB device.
20
+
This allows shipping your .NET nanoFramework device as an USB device without the need for any INF file or specific driver instalation.
21
+
22
+
#### Creating an UsbStream
23
+
24
+
Creating an `UsbStream` requries 2 parameters: a `Guid` that will be used as the Device Interface ID and a `string` which will be used as the device description for the USB device.
To write to the `UsbStream` just call the `Write()` method just like any other .NET stream. Like this:
37
+
38
+
```csharp
39
+
// buffer with dummy data
40
+
varbufer=newbyte[] { 1, 2, 3 };
41
+
42
+
usbStream.Write(bufer, 0, bufer.Length);
43
+
```
44
+
17
45
## Feedback and documentation
18
46
19
47
For documentation, providing feedback, issues and finding out how to contribute please refer to the [Home repo](https://github.com/nanoframework/Home).
0 commit comments