Releases: badcel/HidApi.Net
1.1.0
This release adds new method overloads to Device.Read
and Device.ReadTimeout
. The original signature required the caller to pass in the size of the buffer, allowing HidApi.Net to allocate the buffer and return the result.
The new signatures allow the caller to directly pass in a buffer of type Span<byte>
. This gives the caller some benefits:
- Allow to reuse an existing buffer, thus avoiding unnecessary buffer allocations.
- As
Span<T>
can represent different kinds of memory (managed, native, stack) the caller can decide which kind of memory should be used.
What's Changed
- Add Read overloads for passing in buffer by @TimonLukas in #102
- Fix internal methods using ReadOnlySpans as writable by @TimonLukas in #104
- Restore read method signatures by @badcel in #105
New Contributors
- @TimonLukas made their first contribution in #102
Full Changelog: 1.0.4...1.1.0
1.0.4
This release fixes a bug which could occur if one of the methods Device.GetManufacturer
, Device.GetProduct
, Device.GetSerialNumber
or Device.GetIndexedString
were called. The call of the corresponding native method received the buffer size in byte
instead of chars
leading to possible crashes.
Additionally the returned string could contain null termination characters. Those lead to strings with a length greater than the number of visible characters. Those invisible characters get trimmed now.
What's Changed
Full Changelog: 1.0.3...1.0.4
1.0.3
This is a minor update to HidApi.Net. The public API was not changed.
This release addresses the longstanding issue #2: To communicate with the native HIDAPI library strings need to be converted to the WCharT
datatype. As dotnet does not provide some direct way to interact with this type a manual conversion is needed. This conversion is platform dependent and was done by HidApi.Net internally. For each creation of a string the operating system was checked and the platform dependent code was called.
As other projects could benefit of some WCharT
helper class the code was moved into a separate library (WCharT.Net) and additionally it is now using the Nuget runtime feature to load a WCharT dll which is platform dependent, thus avoiding the checks during runtime.
What's Changed
Full Changelog: 1.0.2...1.0.3
HidApi.Net 1.0.2
This is a minor update adding some documentation comments to make clear which methods could throw a HidException
. Additoinally there is now some API documentation available.
What's Changed
- Support publishing documentation via github pages by @badcel in #88
- Improve doc comments by @badcel in #89
Full Changelog: 1.0.1...1.0.2
HidApi.Net 1.0.1
This is a minor update hiding an exception throw helper from the stacktrace for better discoverability of runtime errors.
What's Changed
- Bump actions/setup-dotnet from 3 to 4 by @dependabot in #78
- Hide throw helper from stacktrace by @badcel in #79
Full Changelog: 1.0.0...1.0.1
HidApi.Net 1.0.0
This release adds two new target frameworks (net7.0 / net8.0), the library is now AOT compatible (net8.0 only) and introduces some minor breaking changes:
- More concrete exceptions are raised in some error scenarios (see #62).
Device
class is nowsealed
to ensure proper management of native memory (see #60).
What's Changed
- Address CA1419 by @tmittet in #61
- Address CA2201: Do not raise reserved exception types by @tmittet in #62
- Support version prefix for releases by @badcel in #68
- Address CA1816: Call GC.SuppressFinalize correctly by @tmittet in #60
- Address CA2101: Specify marshalling for P/Invoke string arguments by @tmittet in #63
- Delete Benchmark project by @badcel in #72
- Update target frameworks by @badcel in #69
- Don't reference SourceLink for net8.0 by @badcel in #73
- Use library import attribute by @badcel in #75
- Mark library as AOT compatible for net8.0 by @badcel in #76
- Update version by @badcel in #77
New Contributors
Full Changelog: 0.4.0...1.0.0
HidApi.Net 0.4.0
This release adds support for new HIDAPI 0.14.0 APIs:
- Added
HidApai.Device.GetReportDescriptor
method
What's Changed
Unit test dependency updates
- Bump BenchmarkDotNet from 0.13.4 to 0.13.5 in /src by @dependabot in #27
- Bump Microsoft.NET.Test.Sdk from 17.4.1 to 17.5.0 in /src by @dependabot in #28
- Bump josStorer/get-current-time from 2.0.2 to 2.1.0 by @dependabot in #29
- Bump josStorer/get-current-time from 2.1.0 to 2.1.1 by @dependabot in #30
- Bump FluentAssertions from 6.10.0 to 6.11.0 in /src by @dependabot in #31
- Bump Microsoft.NET.Test.Sdk from 17.5.0 to 17.6.0 in /src by @dependabot in #34
- Bump MSTest.TestAdapter from 3.0.2 to 3.0.3 in /src by @dependabot in #35
- Bump MSTest.TestFramework from 3.0.2 to 3.0.3 in /src by @dependabot in #36
Full Changelog: 0.3.0...0.4.0
HidApi.Net 0.3.0
This release adds support for new HIDAPI 0.13.0 APIs:
- Added
HidApi.BusType
enumeration - Added
HidApi.Device.GetDeviceInfo()
method - Added
HidApi.DeviceInfo.BusType
field
What's Changed
Unit test dependency updates
- Bump Microsoft.NET.Test.Sdk from 17.4.0 to 17.4.1 in /src by @dependabot in #15
- Bump MSTest.TestAdapter from 3.0.0 to 3.0.1 in /src by @dependabot in #17
- Bump MSTest.TestFramework from 3.0.0 to 3.0.1 in /src by @dependabot in #16
- Bump MSTest.TestAdapter from 3.0.1 to 3.0.2 in /src by @dependabot in #20
- Bump MSTest.TestFramework from 3.0.1 to 3.0.2 in /src by @dependabot in #19
- Bump BenchmarkDotNet from 0.13.2 to 0.13.3 in /src by @dependabot in #18
- Bump FluentAssertions from 6.8.0 to 6.9.0 in /src by @dependabot in #23
- Bump BenchmarkDotNet from 0.13.3 to 0.13.4 in /src by @dependabot in #22
- Bump FluentAssertions from 6.9.0 to 6.10.0 in /src by @dependabot in #24
Full Changelog: 0.2.1...0.3.0
HidApi.Net 0.2.1
HidApi.Net 0.2.0
What's Changed
- Bump FluentAssertions from 6.7.0 to 6.8.0 in /src by @dependabot in #6
- Bump josStorer/get-current-time from 2.0.1 to 2.0.2 by @dependabot in #5
- Support connection via serial number by @badcel in #4
New Contributors
- @dependabot made their first contribution in #6
Full Changelog: 0.1.1...0.2.0