Skip to content

Commit

Permalink
Updated packages to support TinyCLR OS 2.2.0.4200
Browse files Browse the repository at this point in the history
  • Loading branch information
bytewizer committed Jul 16, 2022
1 parent f276b84 commit 0c8e04d
Show file tree
Hide file tree
Showing 19 changed files with 87 additions and 62 deletions.
3 changes: 3 additions & 0 deletions playground/hardware/Bytewizer.TinyCLR.Hardware.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@
<PackageReference Include="GHIElectronics.TinyCLR.Data.Json">
<Version>2.2.0</Version>
</PackageReference>
<PackageReference Include="GHIElectronics.TinyCLR.Devices.I2c">
<Version>2.2.0</Version>
</PackageReference>
<PackageReference Include="GHIElectronics.TinyCLR.Devices.Network">
<Version>2.2.0</Version>
</PackageReference>
Expand Down
24 changes: 23 additions & 1 deletion playground/hardware/Hardware/NetworkProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Threading;

using GHIElectronics.TinyCLR.Pins;
using GHIElectronics.TinyCLR.Devices.I2c;
using GHIElectronics.TinyCLR.Devices.Spi;
using GHIElectronics.TinyCLR.Devices.Gpio;
using GHIElectronics.TinyCLR.Devices.Network;
Expand Down Expand Up @@ -46,7 +47,7 @@ public static void InitializeEthernet()

var networkInterfaceSetting = new EthernetNetworkInterfaceSettings
{
MacAddress = new byte[] { 0x00, 0x8D, 0xB4, 0x49, 0xAD, 0xBD },
MacAddress = GetMacAddress(),

DhcpEnable = true,
DynamicDnsEnable = true,
Expand Down Expand Up @@ -257,6 +258,27 @@ public static void InitializeWiFi2(string ssid, string password)
}
}

private static byte[] GetMacAddress()
{
var i2cController = I2cController.FromName(SC20100.I2cBus.I2c1);
var i2cSettings = new I2cConnectionSettings(0x50);
var i2cDevice = i2cController.GetDevice(i2cSettings);

// Microchip 24AA025E48T EUI-48 Node Address
var writeBuffer = new byte[1] { 0xFA }; // node address value start location
var readBuffer = new byte[6]; // EUI-48 6-byte size

try
{
i2cDevice.WriteRead(writeBuffer, readBuffer);
}
catch
{
readBuffer = new byte[6] { 0x00, 0x8D, 0xB4, 0x49, 0xAD, 0xBD };
}

return readBuffer;
}
public static string Info(NetworkController controller)
{
var ipProperties = controller.GetIPProperties();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,22 +68,22 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Bytewizer.TinyCLR.Identity">
<Version>2.1.10</Version>
<Version>2.1.11</Version>
</PackageReference>
<PackageReference Include="Bytewizer.TinyCLR.Identity.Abstractions">
<Version>2.1.10</Version>
<Version>2.1.11</Version>
</PackageReference>
<PackageReference Include="Bytewizer.TinyCLR.Logging.Abstractions">
<Version>2.1.10</Version>
<Version>2.1.11</Version>
</PackageReference>
<PackageReference Include="GHIElectronics.TinyCLR.Core">
<Version>2.2.0</Version>
<Version>2.2.0.4200</Version>
</PackageReference>
<PackageReference Include="GHIElectronics.TinyCLR.Cryptography">
<Version>2.2.0</Version>
<Version>2.2.0.4200</Version>
</PackageReference>
<PackageReference Include="NuGet.Build.Tasks.Pack">
<Version>6.2.0</Version>
<Version>6.2.1</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Bytewizer.TinyCLR.Logging.Abstractions">
<Version>2.1.10</Version>
<Version>2.1.11</Version>
</PackageReference>
<PackageReference Include="GHIElectronics.TinyCLR.Core">
<Version>2.2.0</Version>
<Version>2.2.0.4200</Version>
</PackageReference>
<PackageReference Include="NuGet.Build.Tasks.Pack">
<Version>6.2.0</Version>
<Version>6.2.1</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Bytewizer.TinyCLR.Logging.Abstractions">
<Version>2.1.10</Version>
<Version>2.1.11</Version>
</PackageReference>
<PackageReference Include="GHIElectronics.TinyCLR.Core">
<Version>2.2.0</Version>
<Version>2.2.0.4200</Version>
</PackageReference>
<PackageReference Include="NuGet.Build.Tasks.Pack">
<Version>6.2.0</Version>
<Version>6.2.1</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,16 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Bytewizer.TinyCLR.Logging.Abstractions">
<Version>2.1.10</Version>
<Version>2.1.11</Version>
</PackageReference>
<PackageReference Include="GHIElectronics.TinyCLR.Core">
<Version>2.2.0</Version>
<Version>2.2.0.4200</Version>
</PackageReference>
<PackageReference Include="GHIElectronics.TinyCLR.Native">
<Version>2.2.0</Version>
<Version>2.2.0.4200</Version>
</PackageReference>
<PackageReference Include="NuGet.Build.Tasks.Pack">
<Version>6.2.0</Version>
<Version>6.2.1</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,16 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Bytewizer.TinyCLR.Logging.Abstractions">
<Version>2.1.10</Version>
<Version>2.1.11</Version>
</PackageReference>
<PackageReference Include="GHIElectronics.TinyCLR.Core">
<Version>2.2.0</Version>
<Version>2.2.0.4200</Version>
</PackageReference>
<PackageReference Include="GHIElectronics.TinyCLR.Data.Json">
<Version>2.2.0</Version>
<Version>2.2.0.4200</Version>
</PackageReference>
<PackageReference Include="NuGet.Build.Tasks.Pack">
<Version>6.2.0</Version>
<Version>6.2.1</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Bytewizer.TinyCLR.Logging.Abstractions">
<Version>2.1.10</Version>
<Version>2.1.11</Version>
</PackageReference>
<PackageReference Include="GHIElectronics.TinyCLR.Core">
<Version>2.2.0</Version>
<Version>2.2.0.4200</Version>
</PackageReference>
<PackageReference Include="NuGet.Build.Tasks.Pack">
<Version>6.2.0</Version>
<Version>6.2.1</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Bytewizer.TinyCLR.Logging.Abstractions">
<Version>2.1.10</Version>
<Version>2.1.11</Version>
</PackageReference>
<PackageReference Include="GHIElectronics.TinyCLR.Core">
<Version>2.2.0</Version>
<Version>2.2.0.4200</Version>
</PackageReference>
<PackageReference Include="NuGet.Build.Tasks.Pack">
<Version>6.2.0</Version>
<Version>6.2.1</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Bytewizer.TinyCLR.Logging.Abstractions">
<Version>2.1.10</Version>
<Version>2.1.11</Version>
</PackageReference>
<PackageReference Include="GHIElectronics.TinyCLR.Core">
<Version>2.2.0</Version>
<Version>2.2.0.4200</Version>
</PackageReference>
<PackageReference Include="NuGet.Build.Tasks.Pack">
<Version>6.2.0</Version>
<Version>6.2.1</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Bytewizer.TinyCLR.Logging.Abstractions">
<Version>2.1.10</Version>
<Version>2.1.11</Version>
</PackageReference>
<PackageReference Include="GHIElectronics.TinyCLR.Devices.Storage">
<Version>2.2.0</Version>
<Version>2.2.0.4200</Version>
</PackageReference>
<PackageReference Include="NuGet.Build.Tasks.Pack">
<Version>6.2.0</Version>
<Version>6.2.1</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Bytewizer.TinyCLR.Logging.Abstractions">
<Version>2.1.10</Version>
<Version>2.1.11</Version>
</PackageReference>
<PackageReference Include="GHIElectronics.TinyCLR.Devices.Storage">
<Version>2.2.0</Version>
<Version>2.2.0.4200</Version>
</PackageReference>
<PackageReference Include="NuGet.Build.Tasks.Pack">
<Version>6.2.0</Version>
<Version>6.2.1</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Bytewizer.TinyCLR.Logging.Abstractions">
<Version>2.1.10</Version>
<Version>2.1.11</Version>
</PackageReference>
<PackageReference Include="GHIElectronics.TinyCLR.Devices.Storage">
<Version>2.2.0</Version>
<Version>2.2.0.4200</Version>
</PackageReference>
<PackageReference Include="NuGet.Build.Tasks.Pack">
<Version>6.2.0</Version>
<Version>6.2.1</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
10 changes: 5 additions & 5 deletions src/http/Bytewizer.TinyCLR.Http/Bytewizer.TinyCLR.Http.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -106,19 +106,19 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Bytewizer.TinyCLR.Logging.Abstractions">
<Version>2.1.10</Version>
<Version>2.1.11</Version>
</PackageReference>
<PackageReference Include="GHIElectronics.TinyCLR.Core">
<Version>2.2.0</Version>
<Version>2.2.0.4200</Version>
</PackageReference>
<PackageReference Include="GHIElectronics.TinyCLR.IO">
<Version>2.2.0</Version>
<Version>2.2.0.4200</Version>
</PackageReference>
<PackageReference Include="GHIElectronics.TinyCLR.Networking">
<Version>2.2.0</Version>
<Version>2.2.0.4200</Version>
</PackageReference>
<PackageReference Include="NuGet.Build.Tasks.Pack">
<Version>6.2.0</Version>
<Version>6.2.1</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
12 changes: 6 additions & 6 deletions src/sntp/Bytewizer.TinyCLR.Sntp/Bytewizer.TinyCLR.Sntp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -66,22 +66,22 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Bytewizer.TinyCLR.Logging.Abstractions">
<Version>2.1.10</Version>
<Version>2.1.11</Version>
</PackageReference>
<PackageReference Include="GHIElectronics.TinyCLR.Devices.Rtc">
<Version>2.2.0</Version>
<Version>2.2.0.4200</Version>
</PackageReference>
<PackageReference Include="GHIElectronics.TinyCLR.IO">
<Version>2.2.0</Version>
<Version>2.2.0.4200</Version>
</PackageReference>
<PackageReference Include="GHIElectronics.TinyCLR.Native">
<Version>2.2.0</Version>
<Version>2.2.0.4200</Version>
</PackageReference>
<PackageReference Include="GHIElectronics.TinyCLR.Networking">
<Version>2.2.0</Version>
<Version>2.2.0.4200</Version>
</PackageReference>
<PackageReference Include="NuGet.Build.Tasks.Pack">
<Version>6.2.0</Version>
<Version>6.2.1</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="NuGet.Build.Tasks.Pack">
<Version>6.2.0</Version>
<Version>6.2.1</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="GHIElectronics.TinyCLR.Core">
<Version>2.2.0</Version>
<Version>2.2.0.4200</Version>
</PackageReference>
<PackageReference Include="GHIElectronics.TinyCLR.Networking">
<Version>2.2.0</Version>
<Version>2.2.0.4200</Version>
</PackageReference>
<PackageReference Include="NuGet.Build.Tasks.Pack">
<Version>6.2.0</Version>
<Version>6.2.1</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="GHIElectronics.TinyCLR.Core">
<Version>2.2.0</Version>
<Version>2.2.0.4200</Version>
</PackageReference>
<PackageReference Include="GHIElectronics.TinyCLR.Networking">
<Version>2.2.0</Version>
<Version>2.2.0.4200</Version>
</PackageReference>
<PackageReference Include="NuGet.Build.Tasks.Pack">
<Version>6.2.0</Version>
<Version>6.2.1</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,19 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Bytewizer.TinyCLR.Logging.Abstractions">
<Version>2.1.10</Version>
<Version>2.1.11</Version>
</PackageReference>
<PackageReference Include="Bytewizer.TinyCLR.Pipeline">
<Version>2.1.10</Version>
<Version>2.1.11</Version>
</PackageReference>
<PackageReference Include="GHIElectronics.TinyCLR.Core">
<Version>2.2.0</Version>
<Version>2.2.0.4200</Version>
</PackageReference>
<PackageReference Include="GHIElectronics.TinyCLR.Networking">
<Version>2.2.0</Version>
<Version>2.2.0.4200</Version>
</PackageReference>
<PackageReference Include="NuGet.Build.Tasks.Pack">
<Version>6.2.0</Version>
<Version>6.2.1</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down

0 comments on commit 0c8e04d

Please sign in to comment.