Provide a brief description on what the component is and its functonality.
## Device Family
Provide a list of component names and link to datasheets (if available) the binding will work with.
**[Family Name Here]**: [Datasheet link here]
## Binding Notes
Provide any specifics related to binding API. This could include how to configure component for particular functions and example code.
**NOTE**: Don't repeat the basics related to System.Device.API* (e.g. connection settings, etc.). This helps keep text/steps down to a minimum for maintainability.
## References
Provide any references to other tutorials, blogs and hardware related to the component that could help others get started.
@@ -17,7 +17,7 @@ We may publish NuGet packages of device bindings at a later date.
## Contributing a binding
Anyone can contribute a binding. Please do! Bindings should follow the model that is used for the [Mcp23xxx](Mcp23xxx/README.md) or [Mcp3008](Mcp3008/README.md) implementations. There is a [Binding Markdown template](Device%20Binding%20Template.md) that can help you get started, as well.
Anyone can contribute a binding. Please do! Bindings should follow the model that is used for the [Mcp23xxx](Mcp23xxx/README.md) or [Mcp3008](Mcp3008/README.md) implementations. There is a [Device Binding Template](../../tools/templates/DeviceBindingTemplate/README.md) that can help you get started, as well.
The Device Binding Template provides an easy way to create device binding projects. This template is based on the [.NET Templates](https://github.com/dotnet/templating).
## How to Install
Currently, there is no NuGet package available so the template folder must be stored locally. Use the following command to install the template where `PATH` is the directory path the template was stored.
```console
dotnet new -i C:\[PATH]\iot\tools\templates\DeviceBindingTemplate\dotnet_new_device-binding_csharp
```
## How to Uninstall
The template can be uninstalled by using the following command where `PATH` is the directory path the template was stored.
```console
dotnet new -u C:\[PATH]\iot\tools\templates\DeviceBindingTemplate\dotnet_new_device-binding_csharp
```
## Example Device Binding
Use the following command to create a device binding project.
*`PATH` is the recommended directory path where other device bindings are located in the repo structure.
* The output parameter (-o) is not required when working in the current directory expected to create the binding project.
```console
dotnet new device-binding -n Foo -o C:\[PATH]\iot\src\devices\Foo
```
The following device binding structure will be created after running the command.
```
iot/
src/
devices/
Foo/
Foo.csproj
Foo.cs
README.md
samples/
Foo.Sample.csproj
Foo.Sample.cs
tests/ <-- Tests are optional
Foo_Not_Required.Tests.csproj
Foo.Tests.cs
```
## Tests Project
There is an optional test project created when the device binding project is created. The tests folder can be deleted if not used.