main/Smdn.Devices.MCP2221-0.9.3
Created
March 15, 2022 14:29
-
-
Save smdn/b7b77b69d440e8de4e92df6f471915b3 to your computer and use it in GitHub Desktop.
Smdn.Devices.MCP2221 0.9.3 Release Notes
- 2022-03-15 update assembly version
- 2022-03-15 use init accessor on all target framework
- 2022-03-15 add IsExternalInit
- 2022-03-15 use Smdn.MSBuild.DefineConstants.NETSdkApi
- 2022-03-14 fix warning CA2253
- 2022-03-14 suppress warning CA2254
- 2022-03-14 suppress warning CA1848
- 2022-03-14 add comment for PackageValidationBaselineVersion
- 2022-03-14 use Smdn.MSBuild.ProjectAssets.*
- 2021-12-30 use Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks.GenerateApiList to generate API list
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/doc/api-list/Smdn.Devices.MCP2221/Smdn.Devices.MCP2221-net5.0.apilist.cs b/doc/api-list/Smdn.Devices.MCP2221/Smdn.Devices.MCP2221-net5.0.apilist.cs | |
index a8b3a54..d067e69 100644 | |
--- a/doc/api-list/Smdn.Devices.MCP2221/Smdn.Devices.MCP2221-net5.0.apilist.cs | |
+++ b/doc/api-list/Smdn.Devices.MCP2221/Smdn.Devices.MCP2221-net5.0.apilist.cs | |
@@ -1,271 +1,271 @@ | |
-// Smdn.Devices.MCP2221.dll (Smdn.Devices.MCP2221-0.9.2 (net5.0)) | |
+// Smdn.Devices.MCP2221.dll (Smdn.Devices.MCP2221-0.9.3) | |
// Name: Smdn.Devices.MCP2221 | |
-// AssemblyVersion: 0.9.2.0 | |
-// InformationalVersion: 0.9.2 (net5.0) | |
+// AssemblyVersion: 0.9.3.0 | |
+// InformationalVersion: 0.9.3+3968a13d13f49f54dd615bc0a80ddf4bd9d3ef84 | |
// TargetFramework: .NETCoreApp,Version=v5.0 | |
// Configuration: Release | |
using System; | |
using System.Collections.Generic; | |
using System.Device.Gpio; | |
using System.Runtime.CompilerServices; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using Microsoft.Extensions.Logging; | |
using Smdn.Devices.MCP2221; | |
using Smdn.Devices.UsbHid; | |
namespace Smdn.Devices.MCP2221 { | |
public enum I2CBusSpeed : int { | |
Default = 0, | |
FastMode = 2, | |
LowSpeedMode = 1, | |
Speed100kBitsPerSec = 0, | |
Speed10kBitsPerSec = 1, | |
Speed400kBitsPerSec = 2, | |
StandardMode = 0, | |
} | |
public class CommandException : InvalidOperationException { | |
public CommandException(string message) {} | |
public CommandException(string message, Exception innerException) {} | |
} | |
public class DeviceNotFoundException : InvalidOperationException { | |
public DeviceNotFoundException() {} | |
public DeviceNotFoundException(string message) {} | |
} | |
public class I2CCommandException : CommandException { | |
public I2CCommandException(I2CAddress address, string message) {} | |
public I2CCommandException(I2CAddress address, string message, Exception innerException) {} | |
public I2CCommandException(string message) {} | |
public I2CCommandException(string message, Exception innerException) {} | |
public I2CAddress Address { get; } | |
} | |
public class I2CNAckException : I2CCommandException { | |
public I2CNAckException(I2CAddress address) {} | |
public I2CNAckException(I2CAddress address, Exception innerException) {} | |
public I2CNAckException(string message) {} | |
public I2CNAckException(string message, Exception innerException) {} | |
} | |
public class I2CReadException : I2CCommandException { | |
public I2CReadException(I2CAddress address, string message) {} | |
public I2CReadException(I2CAddress address, string message, Exception innerException) {} | |
public I2CReadException(string message) {} | |
public I2CReadException(string message, Exception innerException) {} | |
} | |
[Nullable(byte.MinValue)] | |
[NullableContext(1)] | |
public class MCP2221 : | |
IAsyncDisposable, | |
IDisposable | |
{ | |
[NullableContext(byte.MinValue)] | |
public sealed class GP0Functionality : GPFunctionality { | |
public void ConfigureAsLEDURX(CancellationToken cancellationToken = default) {} | |
public ValueTask ConfigureAsLEDURXAsync(CancellationToken cancellationToken = default) {} | |
public void ConfigureAsSSPND(CancellationToken cancellationToken = default) {} | |
public ValueTask ConfigureAsSSPNDAsync(CancellationToken cancellationToken = default) {} | |
} | |
[NullableContext(byte.MinValue)] | |
public sealed class GP1Functionality : GPFunctionality { | |
public void ConfigureAsADC(CancellationToken cancellationToken = default) {} | |
public ValueTask ConfigureAsADCAsync(CancellationToken cancellationToken = default) {} | |
public void ConfigureAsClockOutput(CancellationToken cancellationToken = default) {} | |
public ValueTask ConfigureAsClockOutputAsync(CancellationToken cancellationToken = default) {} | |
public void ConfigureAsInterruptDetection(CancellationToken cancellationToken = default) {} | |
public ValueTask ConfigureAsInterruptDetectionAsync(CancellationToken cancellationToken = default) {} | |
public void ConfigureAsLEDUTX(CancellationToken cancellationToken = default) {} | |
public ValueTask ConfigureAsLEDUTXAsync(CancellationToken cancellationToken = default) {} | |
} | |
[NullableContext(byte.MinValue)] | |
public sealed class GP2Functionality : GPFunctionality { | |
public void ConfigureAsADC(CancellationToken cancellationToken = default) {} | |
public ValueTask ConfigureAsADCAsync(CancellationToken cancellationToken = default) {} | |
public void ConfigureAsDAC(CancellationToken cancellationToken = default) {} | |
public ValueTask ConfigureAsDACAsync(CancellationToken cancellationToken = default) {} | |
public void ConfigureAsUSBCFG(CancellationToken cancellationToken = default) {} | |
public ValueTask ConfigureAsUSBCFGAsync(CancellationToken cancellationToken = default) {} | |
} | |
[NullableContext(byte.MinValue)] | |
public sealed class GP3Functionality : GPFunctionality { | |
public void ConfigureAsADC(CancellationToken cancellationToken = default) {} | |
public ValueTask ConfigureAsADCAsync(CancellationToken cancellationToken = default) {} | |
public void ConfigureAsDAC(CancellationToken cancellationToken = default) {} | |
public ValueTask ConfigureAsDACAsync(CancellationToken cancellationToken = default) {} | |
public void ConfigureAsLEDI2C(CancellationToken cancellationToken = default) {} | |
public ValueTask ConfigureAsLEDI2CAsync(CancellationToken cancellationToken = default) {} | |
} | |
[NullableContext(byte.MinValue)] | |
public abstract class GPFunctionality { | |
public string PinDesignation { get; } | |
public string PinName { get; } | |
public void ConfigureAsGPIO(PinMode initialDirection = PinMode.Output, PinValue initialValue = default, CancellationToken cancellationToken = default) {} | |
public ValueTask ConfigureAsGPIOAsync(PinMode initialDirection = PinMode.Output, PinValue initialValue = default, CancellationToken cancellationToken = default) {} | |
public PinMode GetDirection(CancellationToken cancellationToken = default) {} | |
public ValueTask<PinMode> GetDirectionAsync(CancellationToken cancellationToken = default) {} | |
public PinValue GetValue(CancellationToken cancellationToken = default) {} | |
public ValueTask<PinValue> GetValueAsync(CancellationToken cancellationToken = default) {} | |
public void SetDirection(PinMode newDirection, CancellationToken cancellationToken = default) {} | |
public ValueTask SetDirectionAsync(PinMode newDirection, CancellationToken cancellationToken = default) {} | |
public void SetValue(PinValue newValue, CancellationToken cancellationToken = default) {} | |
public ValueTask SetValueAsync(PinValue newValue, CancellationToken cancellationToken = default) {} | |
} | |
[NullableContext(byte.MinValue)] | |
public sealed class I2CFunctionality { | |
public const int MaxBlockLength = 65535; | |
public I2CBusSpeed BusSpeed { get; set; } | |
public int Read(I2CAddress address, Span<byte> buffer, CancellationToken cancellationToken = default) {} | |
public int Read(I2CAddress address, byte[] buffer, int offset, int count, CancellationToken cancellationToken = default) {} | |
[AsyncStateMachine] | |
public ValueTask<int> ReadAsync(I2CAddress address, Memory<byte> buffer, CancellationToken cancellationToken = default) {} | |
public ValueTask<int> ReadAsync(I2CAddress address, byte[] buffer, int offset, int count, CancellationToken cancellationToken = default) {} | |
public int ReadByte(I2CAddress address, CancellationToken cancellationToken = default) {} | |
[AsyncStateMachine] | |
public ValueTask<int> ReadByteAsync(I2CAddress address, CancellationToken cancellationToken = default) {} | |
public (IReadOnlySet<I2CAddress> WriteAddressSet, IReadOnlySet<I2CAddress> ReadAddressSet) ScanBus(I2CAddress addressRangeMin = default, I2CAddress addressRangeMax = default, IProgress<I2CScanBusProgress> progress = null, CancellationToken cancellationToken = default) {} | |
[AsyncStateMachine] | |
public ValueTask<(IReadOnlySet<I2CAddress> WriteAddressSet, IReadOnlySet<I2CAddress> ReadAddressSet)> ScanBusAsync(I2CAddress addressRangeMin = default, I2CAddress addressRangeMax = default, IProgress<I2CScanBusProgress> progress = null, CancellationToken cancellationToken = default) {} | |
public void Write(I2CAddress address, ReadOnlySpan<byte> buffer, CancellationToken cancellationToken = default) {} | |
public void Write(I2CAddress address, byte[] buffer, int offset, int count, CancellationToken cancellationToken = default) {} | |
[AsyncStateMachine] | |
public ValueTask WriteAsync(I2CAddress address, ReadOnlyMemory<byte> buffer, CancellationToken cancellationToken = default) {} | |
public ValueTask WriteAsync(I2CAddress address, byte[] buffer, int offset, int count, CancellationToken cancellationToken = default) {} | |
public void WriteByte(I2CAddress address, byte @value, CancellationToken cancellationToken = default) {} | |
[AsyncStateMachine] | |
public ValueTask WriteByteAsync(I2CAddress address, byte @value, CancellationToken cancellationToken = default) {} | |
} | |
public const int DeviceProductID = 221; | |
public const int DeviceVendorID = 1240; | |
public const string FirmwareRevisionMCP2221 = "1.1"; | |
public const string FirmwareRevisionMCP2221A = "1.2"; | |
public const string HardwareRevisionMCP2221 = "A.6"; | |
public const string HardwareRevisionMCP2221A = "A.6"; | |
public string ChipFactorySerialNumber { get; } | |
public string FirmwareRevision { get; } | |
[Nullable(byte.MinValue)] | |
public MCP2221.GP0Functionality GP0 { get; } | |
[Nullable(byte.MinValue)] | |
public MCP2221.GP1Functionality GP1 { get; } | |
[Nullable(byte.MinValue)] | |
public MCP2221.GP2Functionality GP2 { get; } | |
[Nullable(byte.MinValue)] | |
public MCP2221.GP3Functionality GP3 { get; } | |
[Nullable(byte.MinValue)] | |
public IReadOnlyList<MCP2221.GPFunctionality> GPs { get; } | |
public string HardwareRevision { get; } | |
public IUsbHidDevice HidDevice { get; } | |
[Nullable(byte.MinValue)] | |
public MCP2221.I2CFunctionality I2C { get; } | |
public string ManufacturerDescriptor { get; } | |
public string ProductDescriptor { get; } | |
public string SerialNumberDescriptor { get; } | |
public void Dispose() {} | |
[AsyncStateMachine] | |
public ValueTask DisposeAsync() {} | |
public static MCP2221 Open(Func<IUsbHidDevice> createHidDevice, [Nullable(2)] IServiceProvider serviceProvider = null) {} | |
public static MCP2221 Open([Nullable(2)] IServiceProvider serviceProvider = null) {} | |
public static MCP2221 Open([Nullable] Predicate<IUsbHidDevice> findDevicePredicate, [Nullable(2)] IServiceProvider serviceProvider = null) {} | |
[AsyncStateMachine] | |
[return: Nullable] public static ValueTask<MCP2221> OpenAsync(Func<IUsbHidDevice> createHidDevice, [Nullable(2)] IServiceProvider serviceProvider = null) {} | |
[NullableContext(2)] | |
[return: Nullable] public static ValueTask<MCP2221> OpenAsync(IServiceProvider serviceProvider = null) {} | |
[NullableContext(2)] | |
[return: Nullable] public static ValueTask<MCP2221> OpenAsync([Nullable] Predicate<IUsbHidDevice> findDevicePredicate, IServiceProvider serviceProvider = null) {} | |
} | |
public readonly struct I2CAddress : | |
IComparable<I2CAddress>, | |
IEquatable<I2CAddress>, | |
IEquatable<byte>, | |
IEquatable<int> | |
{ | |
public static readonly I2CAddress DeviceMaxValue; // = "77" | |
public static readonly I2CAddress DeviceMinValue; // = "08" | |
public static readonly I2CAddress Zero; // = "00" | |
public I2CAddress(int address) {} | |
public I2CAddress(int deviceAddressBits, int hardwareAddressBits) {} | |
public int CompareTo(I2CAddress other) {} | |
public bool Equals(I2CAddress other) {} | |
public bool Equals(byte other) {} | |
public bool Equals(int other) {} | |
public override bool Equals(object obj) {} | |
public override int GetHashCode() {} | |
public override string ToString() {} | |
public static bool operator == (I2CAddress x, I2CAddress y) {} | |
public static explicit operator byte(I2CAddress address) {} | |
public static explicit operator int(I2CAddress address) {} | |
public static bool operator > (I2CAddress left, I2CAddress right) {} | |
public static bool operator >= (I2CAddress left, I2CAddress right) {} | |
public static implicit operator I2CAddress(byte address) {} | |
public static bool operator != (I2CAddress x, I2CAddress y) {} | |
public static bool operator < (I2CAddress left, I2CAddress right) {} | |
public static bool operator <= (I2CAddress left, I2CAddress right) {} | |
} | |
public readonly struct I2CScanBusProgress { | |
public I2CAddress AddressRangeMax { get; } | |
public I2CAddress AddressRangeMin { get; } | |
public int ProgressInPercent { get; } | |
public I2CAddress ScanningAddress { get; } | |
} | |
} | |
namespace Smdn.Devices.UsbHid { | |
public interface IUsbHidDevice : | |
IAsyncDisposable, | |
IDisposable | |
{ | |
string DevicePath { get; } | |
string FileSystemName { get; } | |
string Manufacturer { get; } | |
int ProductID { get; } | |
string ProductName { get; } | |
Version ReleaseNumber { get; } | |
string SerialNumber { get; } | |
int VendorID { get; } | |
IUsbHidStream OpenStream(); | |
ValueTask<IUsbHidStream> OpenStreamAsync(); | |
} | |
public interface IUsbHidStream : | |
IAsyncDisposable, | |
IDisposable | |
{ | |
bool RequiresPacketOnly { get; } | |
int Read(Span<byte> buffer); | |
ValueTask<int> ReadAsync(Memory<byte> buffer); | |
void Write(ReadOnlySpan<byte> buffer); | |
ValueTask WriteAsync(ReadOnlyMemory<byte> buffer); | |
} | |
public static class Log { | |
public static LogLevel NativeLibraryLogLevel { get; set; } | |
} | |
public class UsbHidException : InvalidOperationException { | |
public UsbHidException() {} | |
public UsbHidException(string message) {} | |
} | |
} | |
diff --git a/doc/api-list/Smdn.Devices.MCP2221/Smdn.Devices.MCP2221-netstandard2.1.apilist.cs b/doc/api-list/Smdn.Devices.MCP2221/Smdn.Devices.MCP2221-netstandard2.1.apilist.cs | |
index 6fbdf3b..f62ba62 100644 | |
--- a/doc/api-list/Smdn.Devices.MCP2221/Smdn.Devices.MCP2221-netstandard2.1.apilist.cs | |
+++ b/doc/api-list/Smdn.Devices.MCP2221/Smdn.Devices.MCP2221-netstandard2.1.apilist.cs | |
@@ -1,271 +1,271 @@ | |
-// Smdn.Devices.MCP2221.dll (Smdn.Devices.MCP2221-0.9.2 (netstandard2.1)) | |
+// Smdn.Devices.MCP2221.dll (Smdn.Devices.MCP2221-0.9.3) | |
// Name: Smdn.Devices.MCP2221 | |
-// AssemblyVersion: 0.9.2.0 | |
-// InformationalVersion: 0.9.2 (netstandard2.1) | |
+// AssemblyVersion: 0.9.3.0 | |
+// InformationalVersion: 0.9.3+3968a13d13f49f54dd615bc0a80ddf4bd9d3ef84 | |
// TargetFramework: .NETStandard,Version=v2.1 | |
// Configuration: Release | |
using System; | |
using System.Collections.Generic; | |
using System.Device.Gpio; | |
using System.Runtime.CompilerServices; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using Microsoft.Extensions.Logging; | |
using Smdn.Devices.MCP2221; | |
using Smdn.Devices.UsbHid; | |
namespace Smdn.Devices.MCP2221 { | |
public enum I2CBusSpeed : int { | |
Default = 0, | |
FastMode = 2, | |
LowSpeedMode = 1, | |
Speed100kBitsPerSec = 0, | |
Speed10kBitsPerSec = 1, | |
Speed400kBitsPerSec = 2, | |
StandardMode = 0, | |
} | |
public class CommandException : InvalidOperationException { | |
public CommandException(string message) {} | |
public CommandException(string message, Exception innerException) {} | |
} | |
public class DeviceNotFoundException : InvalidOperationException { | |
public DeviceNotFoundException() {} | |
public DeviceNotFoundException(string message) {} | |
} | |
public class I2CCommandException : CommandException { | |
public I2CCommandException(I2CAddress address, string message) {} | |
public I2CCommandException(I2CAddress address, string message, Exception innerException) {} | |
public I2CCommandException(string message) {} | |
public I2CCommandException(string message, Exception innerException) {} | |
public I2CAddress Address { get; } | |
} | |
public class I2CNAckException : I2CCommandException { | |
public I2CNAckException(I2CAddress address) {} | |
public I2CNAckException(I2CAddress address, Exception innerException) {} | |
public I2CNAckException(string message) {} | |
public I2CNAckException(string message, Exception innerException) {} | |
} | |
public class I2CReadException : I2CCommandException { | |
public I2CReadException(I2CAddress address, string message) {} | |
public I2CReadException(I2CAddress address, string message, Exception innerException) {} | |
public I2CReadException(string message) {} | |
public I2CReadException(string message, Exception innerException) {} | |
} | |
[Nullable(byte.MinValue)] | |
[NullableContext(1)] | |
public class MCP2221 : | |
IAsyncDisposable, | |
IDisposable | |
{ | |
[NullableContext(byte.MinValue)] | |
public sealed class GP0Functionality : GPFunctionality { | |
public void ConfigureAsLEDURX(CancellationToken cancellationToken = default) {} | |
public ValueTask ConfigureAsLEDURXAsync(CancellationToken cancellationToken = default) {} | |
public void ConfigureAsSSPND(CancellationToken cancellationToken = default) {} | |
public ValueTask ConfigureAsSSPNDAsync(CancellationToken cancellationToken = default) {} | |
} | |
[NullableContext(byte.MinValue)] | |
public sealed class GP1Functionality : GPFunctionality { | |
public void ConfigureAsADC(CancellationToken cancellationToken = default) {} | |
public ValueTask ConfigureAsADCAsync(CancellationToken cancellationToken = default) {} | |
public void ConfigureAsClockOutput(CancellationToken cancellationToken = default) {} | |
public ValueTask ConfigureAsClockOutputAsync(CancellationToken cancellationToken = default) {} | |
public void ConfigureAsInterruptDetection(CancellationToken cancellationToken = default) {} | |
public ValueTask ConfigureAsInterruptDetectionAsync(CancellationToken cancellationToken = default) {} | |
public void ConfigureAsLEDUTX(CancellationToken cancellationToken = default) {} | |
public ValueTask ConfigureAsLEDUTXAsync(CancellationToken cancellationToken = default) {} | |
} | |
[NullableContext(byte.MinValue)] | |
public sealed class GP2Functionality : GPFunctionality { | |
public void ConfigureAsADC(CancellationToken cancellationToken = default) {} | |
public ValueTask ConfigureAsADCAsync(CancellationToken cancellationToken = default) {} | |
public void ConfigureAsDAC(CancellationToken cancellationToken = default) {} | |
public ValueTask ConfigureAsDACAsync(CancellationToken cancellationToken = default) {} | |
public void ConfigureAsUSBCFG(CancellationToken cancellationToken = default) {} | |
public ValueTask ConfigureAsUSBCFGAsync(CancellationToken cancellationToken = default) {} | |
} | |
[NullableContext(byte.MinValue)] | |
public sealed class GP3Functionality : GPFunctionality { | |
public void ConfigureAsADC(CancellationToken cancellationToken = default) {} | |
public ValueTask ConfigureAsADCAsync(CancellationToken cancellationToken = default) {} | |
public void ConfigureAsDAC(CancellationToken cancellationToken = default) {} | |
public ValueTask ConfigureAsDACAsync(CancellationToken cancellationToken = default) {} | |
public void ConfigureAsLEDI2C(CancellationToken cancellationToken = default) {} | |
public ValueTask ConfigureAsLEDI2CAsync(CancellationToken cancellationToken = default) {} | |
} | |
[NullableContext(byte.MinValue)] | |
public abstract class GPFunctionality { | |
public string PinDesignation { get; } | |
public string PinName { get; } | |
public void ConfigureAsGPIO(PinMode initialDirection = PinMode.Output, PinValue initialValue = default, CancellationToken cancellationToken = default) {} | |
public ValueTask ConfigureAsGPIOAsync(PinMode initialDirection = PinMode.Output, PinValue initialValue = default, CancellationToken cancellationToken = default) {} | |
public PinMode GetDirection(CancellationToken cancellationToken = default) {} | |
public ValueTask<PinMode> GetDirectionAsync(CancellationToken cancellationToken = default) {} | |
public PinValue GetValue(CancellationToken cancellationToken = default) {} | |
public ValueTask<PinValue> GetValueAsync(CancellationToken cancellationToken = default) {} | |
public void SetDirection(PinMode newDirection, CancellationToken cancellationToken = default) {} | |
public ValueTask SetDirectionAsync(PinMode newDirection, CancellationToken cancellationToken = default) {} | |
public void SetValue(PinValue newValue, CancellationToken cancellationToken = default) {} | |
public ValueTask SetValueAsync(PinValue newValue, CancellationToken cancellationToken = default) {} | |
} | |
[NullableContext(byte.MinValue)] | |
public sealed class I2CFunctionality { | |
public const int MaxBlockLength = 65535; | |
public I2CBusSpeed BusSpeed { get; set; } | |
public int Read(I2CAddress address, Span<byte> buffer, CancellationToken cancellationToken = default) {} | |
public int Read(I2CAddress address, byte[] buffer, int offset, int count, CancellationToken cancellationToken = default) {} | |
[AsyncStateMachine] | |
public ValueTask<int> ReadAsync(I2CAddress address, Memory<byte> buffer, CancellationToken cancellationToken = default) {} | |
public ValueTask<int> ReadAsync(I2CAddress address, byte[] buffer, int offset, int count, CancellationToken cancellationToken = default) {} | |
public int ReadByte(I2CAddress address, CancellationToken cancellationToken = default) {} | |
[AsyncStateMachine] | |
public ValueTask<int> ReadByteAsync(I2CAddress address, CancellationToken cancellationToken = default) {} | |
public (IReadOnlyCollection<I2CAddress> WriteAddressSet, IReadOnlyCollection<I2CAddress> ReadAddressSet) ScanBus(I2CAddress addressRangeMin = default, I2CAddress addressRangeMax = default, IProgress<I2CScanBusProgress> progress = null, CancellationToken cancellationToken = default) {} | |
[AsyncStateMachine] | |
public ValueTask<(IReadOnlyCollection<I2CAddress> WriteAddressSet, IReadOnlyCollection<I2CAddress> ReadAddressSet)> ScanBusAsync(I2CAddress addressRangeMin = default, I2CAddress addressRangeMax = default, IProgress<I2CScanBusProgress> progress = null, CancellationToken cancellationToken = default) {} | |
public void Write(I2CAddress address, ReadOnlySpan<byte> buffer, CancellationToken cancellationToken = default) {} | |
public void Write(I2CAddress address, byte[] buffer, int offset, int count, CancellationToken cancellationToken = default) {} | |
[AsyncStateMachine] | |
public ValueTask WriteAsync(I2CAddress address, ReadOnlyMemory<byte> buffer, CancellationToken cancellationToken = default) {} | |
public ValueTask WriteAsync(I2CAddress address, byte[] buffer, int offset, int count, CancellationToken cancellationToken = default) {} | |
public void WriteByte(I2CAddress address, byte @value, CancellationToken cancellationToken = default) {} | |
[AsyncStateMachine] | |
public ValueTask WriteByteAsync(I2CAddress address, byte @value, CancellationToken cancellationToken = default) {} | |
} | |
public const int DeviceProductID = 221; | |
public const int DeviceVendorID = 1240; | |
public const string FirmwareRevisionMCP2221 = "1.1"; | |
public const string FirmwareRevisionMCP2221A = "1.2"; | |
public const string HardwareRevisionMCP2221 = "A.6"; | |
public const string HardwareRevisionMCP2221A = "A.6"; | |
public string ChipFactorySerialNumber { get; } | |
public string FirmwareRevision { get; } | |
[Nullable(byte.MinValue)] | |
public MCP2221.GP0Functionality GP0 { get; } | |
[Nullable(byte.MinValue)] | |
public MCP2221.GP1Functionality GP1 { get; } | |
[Nullable(byte.MinValue)] | |
public MCP2221.GP2Functionality GP2 { get; } | |
[Nullable(byte.MinValue)] | |
public MCP2221.GP3Functionality GP3 { get; } | |
[Nullable(byte.MinValue)] | |
public IReadOnlyList<MCP2221.GPFunctionality> GPs { get; } | |
public string HardwareRevision { get; } | |
public IUsbHidDevice HidDevice { get; } | |
[Nullable(byte.MinValue)] | |
public MCP2221.I2CFunctionality I2C { get; } | |
public string ManufacturerDescriptor { get; } | |
public string ProductDescriptor { get; } | |
public string SerialNumberDescriptor { get; } | |
public void Dispose() {} | |
[AsyncStateMachine] | |
public ValueTask DisposeAsync() {} | |
public static MCP2221 Open(Func<IUsbHidDevice> createHidDevice, [Nullable(2)] IServiceProvider serviceProvider = null) {} | |
public static MCP2221 Open([Nullable(2)] IServiceProvider serviceProvider = null) {} | |
public static MCP2221 Open([Nullable] Predicate<IUsbHidDevice> findDevicePredicate, [Nullable(2)] IServiceProvider serviceProvider = null) {} | |
[AsyncStateMachine] | |
[return: Nullable] public static ValueTask<MCP2221> OpenAsync(Func<IUsbHidDevice> createHidDevice, [Nullable(2)] IServiceProvider serviceProvider = null) {} | |
[NullableContext(2)] | |
[return: Nullable] public static ValueTask<MCP2221> OpenAsync(IServiceProvider serviceProvider = null) {} | |
[NullableContext(2)] | |
[return: Nullable] public static ValueTask<MCP2221> OpenAsync([Nullable] Predicate<IUsbHidDevice> findDevicePredicate, IServiceProvider serviceProvider = null) {} | |
} | |
public readonly struct I2CAddress : | |
IComparable<I2CAddress>, | |
IEquatable<I2CAddress>, | |
IEquatable<byte>, | |
IEquatable<int> | |
{ | |
public static readonly I2CAddress DeviceMaxValue; // = "77" | |
public static readonly I2CAddress DeviceMinValue; // = "08" | |
public static readonly I2CAddress Zero; // = "00" | |
public I2CAddress(int address) {} | |
public I2CAddress(int deviceAddressBits, int hardwareAddressBits) {} | |
public int CompareTo(I2CAddress other) {} | |
public bool Equals(I2CAddress other) {} | |
public bool Equals(byte other) {} | |
public bool Equals(int other) {} | |
public override bool Equals(object obj) {} | |
public override int GetHashCode() {} | |
public override string ToString() {} | |
public static bool operator == (I2CAddress x, I2CAddress y) {} | |
public static explicit operator byte(I2CAddress address) {} | |
public static explicit operator int(I2CAddress address) {} | |
public static bool operator > (I2CAddress left, I2CAddress right) {} | |
public static bool operator >= (I2CAddress left, I2CAddress right) {} | |
public static implicit operator I2CAddress(byte address) {} | |
public static bool operator != (I2CAddress x, I2CAddress y) {} | |
public static bool operator < (I2CAddress left, I2CAddress right) {} | |
public static bool operator <= (I2CAddress left, I2CAddress right) {} | |
} | |
public readonly struct I2CScanBusProgress { | |
public I2CAddress AddressRangeMax { get; } | |
public I2CAddress AddressRangeMin { get; } | |
public int ProgressInPercent { get; } | |
public I2CAddress ScanningAddress { get; } | |
} | |
} | |
namespace Smdn.Devices.UsbHid { | |
public interface IUsbHidDevice : | |
IAsyncDisposable, | |
IDisposable | |
{ | |
string DevicePath { get; } | |
string FileSystemName { get; } | |
string Manufacturer { get; } | |
int ProductID { get; } | |
string ProductName { get; } | |
Version ReleaseNumber { get; } | |
string SerialNumber { get; } | |
int VendorID { get; } | |
IUsbHidStream OpenStream(); | |
ValueTask<IUsbHidStream> OpenStreamAsync(); | |
} | |
public interface IUsbHidStream : | |
IAsyncDisposable, | |
IDisposable | |
{ | |
bool RequiresPacketOnly { get; } | |
int Read(Span<byte> buffer); | |
ValueTask<int> ReadAsync(Memory<byte> buffer); | |
void Write(ReadOnlySpan<byte> buffer); | |
ValueTask WriteAsync(ReadOnlyMemory<byte> buffer); | |
} | |
public static class Log { | |
public static LogLevel NativeLibraryLogLevel { get; set; } | |
} | |
public class UsbHidException : InvalidOperationException { | |
public UsbHidException() {} | |
public UsbHidException(string message) {} | |
} | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/Smdn.Devices.MCP2221/Smdn.Devices.MCP2221.csproj b/src/Smdn.Devices.MCP2221/Smdn.Devices.MCP2221.csproj | |
index 6cacc6f..d14313d 100644 | |
--- a/src/Smdn.Devices.MCP2221/Smdn.Devices.MCP2221.csproj | |
+++ b/src/Smdn.Devices.MCP2221/Smdn.Devices.MCP2221.csproj | |
@@ -23,10 +23,16 @@ SPDX-License-Identifier: MIT | |
</PropertyGroup> | |
<PropertyGroup> | |
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks> | |
- <VersionPrefix>0.9.2</VersionPrefix> | |
+ <TargetFrameworks>netstandard2.1;net5.0</TargetFrameworks> | |
+ <VersionPrefix>0.9.3</VersionPrefix> | |
<VersionSuffix></VersionSuffix> | |
+ <!-- <PackageValidationBaselineVersion>0.9.0</PackageValidationBaselineVersion> --> | |
<DefineConstants>$(DefineConstants);USBHIDDRIVER_$(UsbHidDriver.ToUpper())</DefineConstants> | |
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks> | |
+ </PropertyGroup> | |
+ | |
+ <PropertyGroup Condition=" '$(Configuration)' == 'Release' " Label="Required properties to generate API list"> | |
+ <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> | |
</PropertyGroup> | |
<PropertyGroup Label="metadata"> | |
diff --git a/src/Smdn.Devices.MCP2221/Smdn.Devices.MCP2221/I2CEngineState.cs b/src/Smdn.Devices.MCP2221/Smdn.Devices.MCP2221/I2CEngineState.cs | |
index c4a5ed9..a148180 100644 | |
--- a/src/Smdn.Devices.MCP2221/Smdn.Devices.MCP2221/I2CEngineState.cs | |
+++ b/src/Smdn.Devices.MCP2221/Smdn.Devices.MCP2221/I2CEngineState.cs | |
@@ -7,11 +7,7 @@ using System.Linq; | |
namespace Smdn.Devices.MCP2221; | |
-internal | |
-#if NET5_0_OR_GREATER | |
-readonly | |
-#endif | |
-struct I2CEngineState { | |
+internal readonly struct I2CEngineState { | |
public enum TransferStatus : byte { | |
NoSpecialOperation = 0x00, // No special operation | |
MarkedForCancellation = 0x10, // The current I2C/SMBus transfer was marked for cancellation | |
@@ -20,104 +16,18 @@ struct I2CEngineState { | |
public bool IsInitialState => StateMachineStateValue == 0 && Address == 0 && CommunicationSpeedDividerValue == 0; | |
- public TransferStatus BusStatus { | |
- get; | |
-#if NET5_0_OR_GREATER | |
- init; | |
-#else | |
- private set; | |
-#endif | |
- } | |
- | |
- public byte StateMachineStateValue { | |
- get; | |
-#if NET5_0_OR_GREATER | |
- init; | |
-#else | |
- private set; | |
-#endif | |
- } | |
- | |
- public int RequestedTransferLength { | |
- get; | |
-#if NET5_0_OR_GREATER | |
- init; | |
-#else | |
- private set; | |
-#endif | |
- } | |
- | |
- public int AlreadyTransferredLength { | |
- get; | |
-#if NET5_0_OR_GREATER | |
- init; | |
-#else | |
- private set; | |
-#endif | |
- } | |
- | |
- public int DataBufferCounter { | |
- get; | |
-#if NET5_0_OR_GREATER | |
- init; | |
-#else | |
- private set; | |
-#endif | |
- } | |
- | |
- public ushort Address { | |
- get; | |
-#if NET5_0_OR_GREATER | |
- init; | |
-#else | |
- private set; | |
-#endif | |
- } | |
- | |
- public int ReadPendingValue { | |
- get; | |
-#if NET5_0_OR_GREATER | |
- init; | |
-#else | |
- private set; | |
-#endif | |
- } | |
- | |
- public byte CommunicationSpeedDividerValue { | |
- get; | |
-#if NET5_0_OR_GREATER | |
- init; | |
-#else | |
- private set; | |
-#endif | |
- } | |
- | |
- public byte TimeoutValue { | |
- get; | |
-#if NET5_0_OR_GREATER | |
- init; | |
-#else | |
- private set; | |
-#endif | |
- } | |
- | |
- public PinValue LineValueSCL { | |
- get; | |
-#if NET5_0_OR_GREATER | |
- init; | |
-#else | |
- private set; | |
-#endif | |
- } | |
- | |
- public PinValue LineValueSDA { | |
- get; | |
-#if NET5_0_OR_GREATER | |
- init; | |
-#else | |
- private set; | |
-#endif | |
- } | |
+ public TransferStatus BusStatus { get; init; } | |
+ public byte StateMachineStateValue { get; init; } | |
+ public int RequestedTransferLength { get; init; } | |
+ public int AlreadyTransferredLength { get; init; } | |
+ public int DataBufferCounter { get; init; } | |
+ | |
+ public ushort Address { get; init; } | |
+ public int ReadPendingValue { get; init; } | |
+ public byte CommunicationSpeedDividerValue { get; init; } | |
+ public byte TimeoutValue { get; init; } | |
+ public PinValue LineValueSCL { get; init; } | |
+ public PinValue LineValueSDA { get; init; } | |
public static I2CEngineState Parse(ReadOnlySpan<byte> resp) | |
=> new() { | |
diff --git a/src/Smdn.Devices.MCP2221/Smdn.Devices.MCP2221/MCP2221.Commands.cs b/src/Smdn.Devices.MCP2221/Smdn.Devices.MCP2221/MCP2221.Commands.cs | |
index 4f7e971..5b6e417 100644 | |
--- a/src/Smdn.Devices.MCP2221/Smdn.Devices.MCP2221/MCP2221.Commands.cs | |
+++ b/src/Smdn.Devices.MCP2221/Smdn.Devices.MCP2221/MCP2221.Commands.cs | |
@@ -1,6 +1,8 @@ | |
// SPDX-FileCopyrightText: 2021 smdn <smdn@smdn.jp> | |
// SPDX-License-Identifier: MIT | |
+#pragma warning disable CA1848, CA2254 | |
+ | |
using System; | |
using System.Buffers; | |
using System.Diagnostics.CodeAnalysis; | |
@@ -74,7 +76,7 @@ partial class MCP2221 { | |
arg | |
); | |
- logger?.LogTrace(eventIdCommand, "> {0}", ConvertByteSequenceToString(commandReportMemory.Span.Slice(1, CommandLength))); | |
+ logger?.LogTrace(eventIdCommand, "> " + ConvertByteSequenceToString(commandReportMemory.Span.Slice(1, CommandLength))); | |
try { | |
await HidStream.WriteAsync( | |
@@ -94,7 +96,7 @@ partial class MCP2221 { | |
throw new CommandException("reading response report failed", ex); | |
} | |
- logger?.LogTrace(eventIdResponse, "< {0}", ConvertByteSequenceToString(responseReportMemory.Span.Slice(1, ResponseLength))); | |
+ logger?.LogTrace(eventIdResponse, "< " + ConvertByteSequenceToString(responseReportMemory.Span.Slice(1, ResponseLength))); | |
if (commandReportMemory.Span[0] != responseReportMemory.Span[0]) | |
throw new CommandException($"unexpected command echo (command code: {commandReportMemory.Span[0]:X2}, command code echo: {responseReportMemory.Span[0]:X2})"); | |
@@ -141,7 +143,7 @@ partial class MCP2221 { | |
arg | |
); | |
- logger?.LogTrace(eventIdCommand, "> {0}", ConvertByteSequenceToString(commandReport.Slice(1))); | |
+ logger?.LogTrace(eventIdCommand, "> " + ConvertByteSequenceToString(commandReport.Slice(1))); | |
try { | |
HidStream.Write(commandReport.Slice(HidStream.RequiresPacketOnly ? 1 : 0)); | |
@@ -157,7 +159,7 @@ partial class MCP2221 { | |
throw new CommandException("reading response report failed", ex); | |
} | |
- logger?.LogTrace(eventIdResponse, "< {0}", ConvertByteSequenceToString(responseReport.Slice(1))); | |
+ logger?.LogTrace(eventIdResponse, "< " + ConvertByteSequenceToString(responseReport.Slice(1))); | |
if (commandReport[0] != responseReport[0]) | |
throw new CommandException($"unexpected command echo (command code: {commandReport[0]:X2}, command code echo: {responseReport[0]:X2})"); | |
diff --git a/src/Smdn.Devices.MCP2221/Smdn.Devices.MCP2221/MCP2221.GPs.cs b/src/Smdn.Devices.MCP2221/Smdn.Devices.MCP2221/MCP2221.GPs.cs | |
index 1e32972..8b49ce8 100644 | |
--- a/src/Smdn.Devices.MCP2221/Smdn.Devices.MCP2221/MCP2221.GPs.cs | |
+++ b/src/Smdn.Devices.MCP2221/Smdn.Devices.MCP2221/MCP2221.GPs.cs | |
@@ -1,6 +1,8 @@ | |
// SPDX-FileCopyrightText: 2021 smdn <smdn@smdn.jp> | |
// SPDX-License-Identifier: MIT | |
+#pragma warning disable CA1848 | |
+ | |
using System; | |
using System.Buffers; | |
using System.Collections.Generic; | |
diff --git a/src/Smdn.Devices.MCP2221/Smdn.Devices.MCP2221/MCP2221.I2C.Engine.cs b/src/Smdn.Devices.MCP2221/Smdn.Devices.MCP2221/MCP2221.I2C.Engine.cs | |
index 2014ea2..b4d590b 100644 | |
--- a/src/Smdn.Devices.MCP2221/Smdn.Devices.MCP2221/MCP2221.I2C.Engine.cs | |
+++ b/src/Smdn.Devices.MCP2221/Smdn.Devices.MCP2221/MCP2221.I2C.Engine.cs | |
@@ -1,6 +1,8 @@ | |
// SPDX-FileCopyrightText: 2021 smdn <smdn@smdn.jp> | |
// SPDX-License-Identifier: MIT | |
+#pragma warning disable CA1848, CA2254 | |
+ | |
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics.CodeAnalysis; | |
diff --git a/src/Smdn.Devices.MCP2221/Smdn.Devices.MCP2221/MCP2221.I2C.Scanning.cs b/src/Smdn.Devices.MCP2221/Smdn.Devices.MCP2221/MCP2221.I2C.Scanning.cs | |
index e05c8fc..c77ad6b 100644 | |
--- a/src/Smdn.Devices.MCP2221/Smdn.Devices.MCP2221/MCP2221.I2C.Scanning.cs | |
+++ b/src/Smdn.Devices.MCP2221/Smdn.Devices.MCP2221/MCP2221.I2C.Scanning.cs | |
@@ -7,7 +7,7 @@ using System.Threading; | |
using System.Threading.Tasks; | |
using IReadOnlyI2CAddressSet = | |
-#if NET5_0_OR_GREATER | |
+#if SYSTEM_COLLECTIONS_GENERIC_IREADONLYSET | |
System.Collections.Generic.IReadOnlySet | |
#else | |
System.Collections.Generic.IReadOnlyCollection | |
diff --git a/src/Smdn.Devices.MCP2221/Smdn.Devices.MCP2221/MCP2221.I2C.cs b/src/Smdn.Devices.MCP2221/Smdn.Devices.MCP2221/MCP2221.I2C.cs | |
index 497a815..659c0aa 100644 | |
--- a/src/Smdn.Devices.MCP2221/Smdn.Devices.MCP2221/MCP2221.I2C.cs | |
+++ b/src/Smdn.Devices.MCP2221/Smdn.Devices.MCP2221/MCP2221.I2C.cs | |
@@ -1,6 +1,8 @@ | |
// SPDX-FileCopyrightText: 2021 smdn <smdn@smdn.jp> | |
// SPDX-License-Identifier: MIT | |
+#pragma warning disable CA1848, CA2254 | |
+ | |
using System; | |
using System.Buffers; | |
using System.Diagnostics.CodeAnalysis; | |
@@ -52,7 +54,7 @@ partial class MCP2221 { | |
var state = I2CEngineState.Parse(resp); | |
var isBusStatusDefined = | |
-#if NET5_0_OR_GREATER | |
+#if SYSTEM_ENUM_ISDEFINED_OF_TENUM | |
Enum.IsDefined<I2CEngineState.TransferStatus>(state.BusStatus); | |
#else | |
Enum.IsDefined(typeof(I2CEngineState.TransferStatus), state.BusStatus); | |
diff --git a/src/Smdn.Devices.MCP2221/Smdn.Devices.UsbHid.HidSharp/Device.cs b/src/Smdn.Devices.MCP2221/Smdn.Devices.UsbHid.HidSharp/Device.cs | |
index 72f7edd..d227e25 100644 | |
--- a/src/Smdn.Devices.MCP2221/Smdn.Devices.UsbHid.HidSharp/Device.cs | |
+++ b/src/Smdn.Devices.MCP2221/Smdn.Devices.UsbHid.HidSharp/Device.cs | |
@@ -1,6 +1,8 @@ | |
// SPDX-FileCopyrightText: 2021 smdn <smdn@smdn.jp> | |
// SPDX-License-Identifier: MIT | |
+#pragma warning disable CA1848, CA2254 | |
+ | |
#if USBHIDDRIVER_HIDSHARP | |
using System; | |
@@ -123,7 +125,7 @@ internal class Device : IUsbHidDevice { | |
{ | |
hidDevice = null; | |
-#if NET5_0_OR_GREATER | |
+#if SYSTEM_THREADING_TASKS_VALUETASK_COMPLETEDTASK | |
return ValueTask.CompletedTask; | |
#else | |
return new ValueTask(Task.CompletedTask); | |
diff --git a/src/Smdn.Devices.MCP2221/Smdn.Devices.UsbHid.HidSharp/Stream.cs b/src/Smdn.Devices.MCP2221/Smdn.Devices.UsbHid.HidSharp/Stream.cs | |
index 4a6b1f7..21653fe 100644 | |
--- a/src/Smdn.Devices.MCP2221/Smdn.Devices.UsbHid.HidSharp/Stream.cs | |
+++ b/src/Smdn.Devices.MCP2221/Smdn.Devices.UsbHid.HidSharp/Stream.cs | |
@@ -75,7 +75,7 @@ internal class Stream : IUsbHidStream { | |
ArrayPool<byte>.Shared.Return(buf); | |
} | |
-#if NET5_0_OR_GREATER | |
+#if SYSTEM_THREADING_TASKS_VALUETASK_COMPLETEDTASK | |
return ValueTask.CompletedTask; | |
#else | |
return default; | |
@@ -118,7 +118,7 @@ internal class Stream : IUsbHidStream { | |
try { | |
#pragma warning disable SA1114 | |
-#if NET5_0_OR_GREATER | |
+#if SYSTEM_THREADING_TASKS_VALUETASK_FROMRESULT | |
return ValueTask.FromResult<int>( | |
#else | |
return new ValueTask<int>( | |
diff --git a/src/Smdn.Devices.MCP2221/Smdn.Devices.UsbHid.LibUsbDotNet/Device.cs b/src/Smdn.Devices.MCP2221/Smdn.Devices.UsbHid.LibUsbDotNet/Device.cs | |
index c6257a8..1597b25 100644 | |
--- a/src/Smdn.Devices.MCP2221/Smdn.Devices.UsbHid.LibUsbDotNet/Device.cs | |
+++ b/src/Smdn.Devices.MCP2221/Smdn.Devices.UsbHid.LibUsbDotNet/Device.cs | |
@@ -165,7 +165,7 @@ internal class Device : IUsbHidDevice { | |
public ValueTask<IUsbHidStream> OpenStreamAsync() | |
{ | |
return | |
-#if NET5_0_OR_GREATER | |
+#if SYSTEM_THREADING_TASKS_VALUETASK_FROMRESULT | |
ValueTask.FromResult<IUsbHidStream> | |
#else | |
new ValueTask<IUsbHidStream> | |
@@ -187,7 +187,7 @@ internal class Device : IUsbHidDevice { | |
_usbDevice?.Dispose(); | |
_usbDevice = null; | |
-#if NET5_0_OR_GREATER | |
+#if SYSTEM_THREADING_TASKS_VALUETASK_FROMRESULT | |
return ValueTask.CompletedTask; | |
#else | |
return new ValueTask(Task.CompletedTask); | |
diff --git a/src/Smdn.Devices.MCP2221/Smdn.Devices.UsbHid.LibUsbDotNet/Stream.cs b/src/Smdn.Devices.MCP2221/Smdn.Devices.UsbHid.LibUsbDotNet/Stream.cs | |
index dd8e22d..bc669b3 100644 | |
--- a/src/Smdn.Devices.MCP2221/Smdn.Devices.UsbHid.LibUsbDotNet/Stream.cs | |
+++ b/src/Smdn.Devices.MCP2221/Smdn.Devices.UsbHid.LibUsbDotNet/Stream.cs | |
@@ -55,7 +55,7 @@ internal class Stream : IUsbHidStream { | |
_writer = null; | |
_reader = null; | |
-#if NET5_0_OR_GREATER | |
+#if SYSTEM_THREADING_TASKS_VALUETASK_COMPLETEDTASK | |
return ValueTask.CompletedTask; | |
#else | |
return new ValueTask(Task.CompletedTask); | |
@@ -98,7 +98,7 @@ internal class Stream : IUsbHidStream { | |
out var transferLength | |
); | |
-#if NET5_0_OR_GREATER | |
+#if SYSTEM_THREADING_TASKS_VALUETASK_COMPLETEDTASK | |
return ValueTask.CompletedTask; | |
#else | |
return default; | |
@@ -136,7 +136,7 @@ internal class Stream : IUsbHidStream { | |
); | |
return | |
-#if NET5_0_OR_GREATER | |
+#if SYSTEM_THREADING_TASKS_VALUETASK_FROMRESULT | |
ValueTask.FromResult<int> | |
#else | |
new ValueTask<int> | |
diff --git a/src/Smdn.Devices.MCP2221/System.Runtime.CompilerServices/IsExternalInit.cs b/src/Smdn.Devices.MCP2221/System.Runtime.CompilerServices/IsExternalInit.cs | |
new file mode 100644 | |
index 0000000..721f1d6 | |
--- /dev/null | |
+++ b/src/Smdn.Devices.MCP2221/System.Runtime.CompilerServices/IsExternalInit.cs | |
@@ -0,0 +1,8 @@ | |
+// SPDX-FileCopyrightText: 2021 smdn <smdn@smdn.jp> | |
+// SPDX-License-Identifier: MIT | |
+ | |
+#if !SYSTEM_RUNTIME_COMPILERSERVICES_ISEXTERNALINIT | |
+namespace System.Runtime.CompilerServices; | |
+ | |
+internal sealed class IsExternalInit { } | |
+#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment