Skip to content

Commit b6a5bb9

Browse files
authored
release-v1.0.4
\r\n***PUBLISH_RELEASE***
2 parents 3dfa1e2 + c38fd8d commit b6a5bb9

16 files changed

Lines changed: 224 additions & 125 deletions

.github/workflows/update-dependencies.yml

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -21,32 +21,12 @@ jobs:
2121
name: Update .NET nanoFramework dependencies
2222
timeout-minutes: 15
2323
runs-on: windows-latest
24+
env:
25+
GITHUB_TOKEN: ${{ github.token }}
2426
steps:
2527
- name: Checkout
2628
uses: actions/checkout@v2
27-
with:
28-
path: main
29-
- name: Checkout tools repo
30-
uses: actions/checkout@v2
31-
with:
32-
repository: nanoframework/nf-tools
33-
path: tools
3429
- name: Update dependencies
35-
run: ./github-actions/update-nf-dependencies.ps1
36-
working-directory: tools
37-
- name: Create Pull Request
38-
uses: peter-evans/create-pull-request@v3
39-
if: env.CREATE_PR == 'true'
30+
uses: nanoframework/nanodu@v1
4031
with:
41-
title: '${{ env.PR_TITLE }}'
42-
body: |
43-
${{ env.PR_MESSAGE }}
44-
45-
[version update]
46-
47-
### :warning: This is an automated update. :warning:
48-
committer: 'nfbot <dependencybot@nanoframework.net>'
49-
branch: ${{ env.BRANCH_NAME }}
50-
path: main
51-
labels: |
52-
Type: dependencies
32+
solutionsToCheck: 'nanoFramework.System.Device.Spi.sln'

CHANGELOG.md

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,159 @@
22

33
## [v1.0.2-preview.31](https://github.com/nanoframework/System.Device.Spi/tree/v1.0.2-preview.31) (2021-12-02)
44

5+
[Full Changelog](https://github.com/nanoframework/System.Device.Spi/compare/v1.0.4-preview.11...HEAD)
6+
7+
**Documentation and other chores:**
8+
9+
- Update 1 NuGet dependencies [\#73](https://github.com/nanoframework/System.Device.Spi/pull/73)
10+
- Update 1 NuGet dependencies [\#72](https://github.com/nanoframework/System.Device.Spi/pull/72)
11+
12+
## [v1.0.4-preview.11](https://github.com/nanoframework/System.Device.Spi/tree/v1.0.4-preview.11) (2022-03-17)
13+
14+
[Full Changelog](https://github.com/nanoframework/System.Device.Spi/compare/v1.0.4-preview.9...v1.0.4-preview.11)
15+
16+
**Documentation and other chores:**
17+
18+
- Update 2 NuGet dependencies [\#71](https://github.com/nanoframework/System.Device.Spi/pull/71)
19+
20+
## [v1.0.4-preview.9](https://github.com/nanoframework/System.Device.Spi/tree/v1.0.4-preview.9) (2022-03-17)
21+
22+
[Full Changelog](https://github.com/nanoframework/System.Device.Spi/compare/v1.0.4-preview.7...v1.0.4-preview.9)
23+
24+
**Documentation and other chores:**
25+
26+
- Update 1 NuGet dependencies [\#70](https://github.com/nanoframework/System.Device.Spi/pull/70)
27+
28+
## [v1.0.4-preview.7](https://github.com/nanoframework/System.Device.Spi/tree/v1.0.4-preview.7) (2022-03-14)
29+
30+
[Full Changelog](https://github.com/nanoframework/System.Device.Spi/compare/v1.0.4-preview.5...v1.0.4-preview.7)
31+
32+
**Documentation and other chores:**
33+
34+
- Update 3 NuGet dependencies [\#69](https://github.com/nanoframework/System.Device.Spi/pull/69)
35+
36+
## [v1.0.4-preview.5](https://github.com/nanoframework/System.Device.Spi/tree/v1.0.4-preview.5) (2022-03-14)
37+
38+
[Full Changelog](https://github.com/nanoframework/System.Device.Spi/compare/v1.0.4-preview.3...v1.0.4-preview.5)
39+
40+
**Documentation and other chores:**
41+
42+
- Update 1 NuGet dependencies [\#68](https://github.com/nanoframework/System.Device.Spi/pull/68)
43+
44+
## [v1.0.4-preview.3](https://github.com/nanoframework/System.Device.Spi/tree/v1.0.4-preview.3) (2022-03-03)
45+
46+
[Full Changelog](https://github.com/nanoframework/System.Device.Spi/compare/v1.0.4-preview.1...v1.0.4-preview.3)
47+
48+
**Documentation and other chores:**
49+
50+
- Update 1 NuGet dependencies [\#67](https://github.com/nanoframework/System.Device.Spi/pull/67)
51+
52+
## [v1.0.4-preview.1](https://github.com/nanoframework/System.Device.Spi/tree/v1.0.4-preview.1) (2022-02-24)
53+
54+
[Full Changelog](https://github.com/nanoframework/System.Device.Spi/compare/v1.0.3-preview.24...v1.0.4-preview.1)
55+
56+
**Implemented enhancements:**
57+
58+
- Rework SpiBusInfo [\#66](https://github.com/nanoframework/System.Device.Spi/pull/66)
59+
60+
**Documentation and other chores:**
61+
62+
- Update 1 NuGet dependencies [\#65](https://github.com/nanoframework/System.Device.Spi/pull/65)
63+
64+
## [v1.0.3-preview.24](https://github.com/nanoframework/System.Device.Spi/tree/v1.0.3-preview.24) (2022-02-18)
65+
66+
[Full Changelog](https://github.com/nanoframework/System.Device.Spi/compare/v1.0.3-preview.21...v1.0.3-preview.24)
67+
68+
**Documentation and other chores:**
69+
70+
- Update 2 NuGet dependencies [\#64](https://github.com/nanoframework/System.Device.Spi/pull/64)
71+
72+
## [v1.0.3-preview.21](https://github.com/nanoframework/System.Device.Spi/tree/v1.0.3-preview.21) (2022-02-17)
73+
74+
[Full Changelog](https://github.com/nanoframework/System.Device.Spi/compare/v1.0.3-preview.19...v1.0.3-preview.21)
75+
76+
**Documentation and other chores:**
77+
78+
- Update 1 NuGet dependencies [\#63](https://github.com/nanoframework/System.Device.Spi/pull/63)
79+
80+
## [v1.0.3-preview.19](https://github.com/nanoframework/System.Device.Spi/tree/v1.0.3-preview.19) (2022-02-04)
81+
82+
[Full Changelog](https://github.com/nanoframework/System.Device.Spi/compare/v1.0.3-preview.17...v1.0.3-preview.19)
83+
84+
**Documentation and other chores:**
85+
86+
- Update 1 NuGet dependencies [\#62](https://github.com/nanoframework/System.Device.Spi/pull/62)
87+
88+
## [v1.0.3-preview.17](https://github.com/nanoframework/System.Device.Spi/tree/v1.0.3-preview.17) (2022-01-28)
89+
90+
[Full Changelog](https://github.com/nanoframework/System.Device.Spi/compare/v1.0.3-preview.15...v1.0.3-preview.17)
91+
92+
**Documentation and other chores:**
93+
94+
- Update 3 NuGet dependencies [\#61](https://github.com/nanoframework/System.Device.Spi/pull/61)
95+
96+
## [v1.0.3-preview.15](https://github.com/nanoframework/System.Device.Spi/tree/v1.0.3-preview.15) (2022-01-28)
97+
98+
[Full Changelog](https://github.com/nanoframework/System.Device.Spi/compare/v1.0.3-preview.13...v1.0.3-preview.15)
99+
100+
**Documentation and other chores:**
101+
102+
- Update 1 NuGet dependencies [\#60](https://github.com/nanoframework/System.Device.Spi/pull/60)
103+
104+
## [v1.0.3-preview.13](https://github.com/nanoframework/System.Device.Spi/tree/v1.0.3-preview.13) (2022-01-28)
105+
106+
[Full Changelog](https://github.com/nanoframework/System.Device.Spi/compare/v1.0.3-preview.11...v1.0.3-preview.13)
107+
108+
**Fixed bugs:**
109+
110+
- Remove ChipSelect default value in SpiConectionSettings [\#59](https://github.com/nanoframework/System.Device.Spi/pull/59)
111+
112+
## [v1.0.3-preview.11](https://github.com/nanoframework/System.Device.Spi/tree/v1.0.3-preview.11) (2022-01-22)
113+
114+
[Full Changelog](https://github.com/nanoframework/System.Device.Spi/compare/v1.0.3-preview.9...v1.0.3-preview.11)
115+
116+
**Documentation and other chores:**
117+
118+
- Update 1 NuGet dependencies [\#58](https://github.com/nanoframework/System.Device.Spi/pull/58)
119+
120+
## [v1.0.3-preview.9](https://github.com/nanoframework/System.Device.Spi/tree/v1.0.3-preview.9) (2022-01-21)
121+
122+
[Full Changelog](https://github.com/nanoframework/System.Device.Spi/compare/v1.0.3-preview.7...v1.0.3-preview.9)
123+
124+
**Documentation and other chores:**
125+
126+
- Update 1 NuGet dependencies [\#57](https://github.com/nanoframework/System.Device.Spi/pull/57)
127+
128+
## [v1.0.3-preview.7](https://github.com/nanoframework/System.Device.Spi/tree/v1.0.3-preview.7) (2022-01-21)
129+
130+
[Full Changelog](https://github.com/nanoframework/System.Device.Spi/compare/v1.0.3-preview.5...v1.0.3-preview.7)
131+
132+
**Documentation and other chores:**
133+
134+
- Update 1 NuGet dependencies [\#56](https://github.com/nanoframework/System.Device.Spi/pull/56)
135+
136+
## [v1.0.3-preview.5](https://github.com/nanoframework/System.Device.Spi/tree/v1.0.3-preview.5) (2022-01-21)
137+
138+
[Full Changelog](https://github.com/nanoframework/System.Device.Spi/compare/v1.0.3-preview.3...v1.0.3-preview.5)
139+
140+
**Documentation and other chores:**
141+
142+
- Update 2 NuGet dependencies [\#54](https://github.com/nanoframework/System.Device.Spi/pull/54)
143+
144+
## [v1.0.3-preview.3](https://github.com/nanoframework/System.Device.Spi/tree/v1.0.3-preview.3) (2021-12-29)
145+
146+
[Full Changelog](https://github.com/nanoframework/System.Device.Spi/compare/v1.0.2...v1.0.3-preview.3)
147+
148+
**Documentation and other chores:**
149+
150+
- Update 2 nuget dependencies [\#53](https://github.com/nanoframework/System.Device.Spi/pull/53)
151+
152+
## [v1.0.2](https://github.com/nanoframework/System.Device.Spi/tree/v1.0.2) (2021-12-02)
153+
154+
[Full Changelog](https://github.com/nanoframework/System.Device.Spi/compare/v1.0.2-preview.31...v1.0.2)
155+
156+
## [v1.0.2-preview.31](https://github.com/nanoframework/System.Device.Spi/tree/v1.0.2-preview.31) (2021-12-02)
157+
5158
[Full Changelog](https://github.com/nanoframework/System.Device.Spi/compare/v1.0.2-preview.29...v1.0.2-preview.31)
6159

7160
**Documentation and other chores:**

README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,8 @@ To get the default bus values, especially the bus min and max frequencies, the m
4040

4141
```csharp
4242
SpiBusInfo spiBusInfo = SpiDevice.GetBusInfo(1);
43-
Debug.WriteLine($"{nameof(spiBusInfo.ChipSelectLineCount)}: {spiBusInfo.ChipSelectLineCount}");
4443
Debug.WriteLine($"{nameof(spiBusInfo.MaxClockFrequency)}: {spiBusInfo.MaxClockFrequency}");
4544
Debug.WriteLine($"{nameof(spiBusInfo.MinClockFrequency)}: {spiBusInfo.MinClockFrequency}");
46-
Debug.WriteLine($"{nameof(spiBusInfo.SupportedDataBitLengths)}: ");
47-
foreach(var data in spiBusInfo.SupportedDataBitLengths)
48-
{
49-
Debug.WriteLine($" {data}");
50-
}
5145
```
5246

5347
### Reading and Writing

System.Device.Spi/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010

1111
////////////////////////////////////////////////////////////////
1212
// update this whenever the native assembly signature changes //
13-
[assembly: AssemblyNativeVersion("100.1.0.0")]
13+
[assembly: AssemblyNativeVersion("100.1.1.0")]
1414
////////////////////////////////////////////////////////////////

System.Device.Spi/SpiBusInfo.cs

Lines changed: 4 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,16 @@
88
namespace System.Device.Spi
99
{
1010
/// <summary>
11-
/// Represents the info about a SPI bus.
11+
/// Base class for SPI bus information.
1212
/// </summary>
1313
public sealed class SpiBusInfo
1414
{
1515
[System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)]
16-
private int _controllerId;
16+
private readonly int _controllerId;
1717

1818
internal SpiBusInfo(int spiBus)
1919
{
2020
_controllerId = spiBus;
21-
22-
}
23-
24-
/// <summary>
25-
/// Gets the number of chip select lines available on the bus.
26-
/// </summary>
27-
/// <value>
28-
/// Number of chip select lines.
29-
/// </value>
30-
public int ChipSelectLineCount
31-
{
32-
get { return NativeChipSelectLineCount(); }
3321
}
3422

3523
/// <summary>
@@ -38,53 +26,24 @@ public int ChipSelectLineCount
3826
/// <value>
3927
/// The clock cycle in Hz.
4028
/// </value>
41-
public int MaxClockFrequency
42-
{
43-
get { return NativeMaxClockFrequency(); }
44-
}
29+
public int MaxClockFrequency => NativeMaxClockFrequency();
4530

4631
/// <summary>
4732
/// Minimum clock cycle frequency of the bus.
4833
/// </summary>
4934
/// <value>
5035
/// The clock cycle in Hz.
5136
/// </value>
52-
public int MinClockFrequency
53-
{
54-
get { return NativeMinClockFrequency(); }
55-
}
56-
57-
/// <summary>
58-
/// Gets the bit lengths that can be used on the bus for transmitting data.
59-
/// </summary>
60-
/// <value>
61-
/// The supported data lengths.
62-
/// </value>
63-
public int[] SupportedDataBitLengths
64-
{
65-
get
66-
{
67-
return new[] { 8, 16 };
68-
}
69-
}
37+
public int MinClockFrequency => NativeMinClockFrequency();
7038

7139
#region Native Calls
7240

73-
74-
[MethodImpl(MethodImplOptions.InternalCall)]
75-
private extern int NativeChipSelectLineCount();
76-
7741
[MethodImpl(MethodImplOptions.InternalCall)]
7842
private extern int NativeMaxClockFrequency();
7943

8044
[MethodImpl(MethodImplOptions.InternalCall)]
8145
private extern int NativeMinClockFrequency();
8246

83-
8447
#endregion
85-
86-
87-
88-
8948
}
9049
}

System.Device.Spi/SpiConnectionSettings.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@ private SpiConnectionSettings()
3838
/// Initializes a new instance of the <see cref="SpiConnectionSettings"/> class.
3939
/// </summary>
4040
/// <param name="busId">The bus ID the device is connected to.</param>
41-
/// <param name="chipSelectLine">The chip select line used on the bus. Optional, -1 if not used</param>
42-
public SpiConnectionSettings(int busId, int chipSelectLine = -1)
41+
/// <param name="chipSelectLine">The chip select line used on the bus. In .NET nanoFramework, you need to have a
42+
/// valid GPIO Chip Select even if you don't use it.</param>
43+
public SpiConnectionSettings(int busId, int chipSelectLine)
4344
{
4445
BusId = busId;
4546
ChipSelectLine = chipSelectLine;

System.Device.Spi/SpiDevice.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ public void TransferFullDuplex(SpanByte writeBuffer, SpanByte readBuffer)
133133
/// </summary>
134134
/// <param name="busId">The id of the bus.</param>
135135
/// <returns>The bus info requested.</returns>
136+
/// <exception cref="ArgumentOutOfRangeException">If the <paramref name="busId"/> is not available in the device.</exception>
136137
public static SpiBusInfo GetBusInfo(int busId)
137138
{
138139
return new SpiBusInfo(busId);

System.Device.Spi/System.Device.Spi.nfproj

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<RootNamespace>System.Device.Spi</RootNamespace>
1616
<AssemblyName>System.Device.Spi</AssemblyName>
1717
<TargetFrameworkVersion>v1.0</TargetFrameworkVersion>
18+
<NF_IsCoreLibrary>True</NF_IsCoreLibrary>
1819
<DocumentationFile>bin\$(Configuration)\System.Device.Spi.xml</DocumentationFile>
1920
</PropertyGroup>
2021
<PropertyGroup>
@@ -54,16 +55,16 @@
5455
<None Include="packages.config" />
5556
</ItemGroup>
5657
<ItemGroup>
57-
<Reference Include="mscorlib, Version=1.11.7.2, Culture=neutral, PublicKeyToken=c07d481e9758c731">
58-
<HintPath>..\packages\nanoFramework.CoreLibrary.1.11.7\lib\mscorlib.dll</HintPath>
58+
<Reference Include="mscorlib, Version=1.12.0.4, Culture=neutral, PublicKeyToken=c07d481e9758c731">
59+
<HintPath>..\packages\nanoFramework.CoreLibrary.1.12.0\lib\mscorlib.dll</HintPath>
5960
<Private>True</Private>
6061
</Reference>
61-
<Reference Include="nanoFramework.Runtime.Events, Version=1.9.2.3, Culture=neutral, PublicKeyToken=c07d481e9758c731">
62-
<HintPath>..\packages\nanoFramework.Runtime.Events.1.9.2\lib\nanoFramework.Runtime.Events.dll</HintPath>
62+
<Reference Include="nanoFramework.Runtime.Events, Version=1.10.0.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
63+
<HintPath>..\packages\nanoFramework.Runtime.Events.1.10.0-preview.13\lib\nanoFramework.Runtime.Events.dll</HintPath>
6364
<Private>True</Private>
6465
</Reference>
65-
<Reference Include="System.Device.Gpio, Version=1.0.2.3, Culture=neutral, PublicKeyToken=c07d481e9758c731">
66-
<HintPath>..\packages\nanoFramework.System.Device.Gpio.1.0.2\lib\System.Device.Gpio.dll</HintPath>
66+
<Reference Include="System.Device.Gpio, Version=1.0.3.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
67+
<HintPath>..\packages\nanoFramework.System.Device.Gpio.1.0.3-preview.18\lib\System.Device.Gpio.dll</HintPath>
6768
<Private>True</Private>
6869
</Reference>
6970
</ItemGroup>

System.Device.Spi/packages.config

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="nanoFramework.CoreLibrary" version="1.11.7" targetFramework="netnanoframework10" />
4-
<package id="nanoFramework.Runtime.Events" version="1.9.2" targetFramework="netnanoframework10" />
5-
<package id="nanoFramework.System.Device.Gpio" version="1.0.2" targetFramework="netnanoframework10" />
3+
<package id="nanoFramework.CoreLibrary" version="1.12.0" targetFramework="netnanoframework10" />
4+
<package id="nanoFramework.Runtime.Events" version="1.10.0-preview.13" targetFramework="netnanoframework10" />
5+
<package id="nanoFramework.System.Device.Gpio" version="1.0.3-preview.18" targetFramework="netnanoframework10" />
66
<package id="Nerdbank.GitVersioning" version="3.4.244" developmentDependency="true" targetFramework="netnanoframework10" />
77
</packages>

Test/SpiHardwareUnitTests/SimpleSpiTests.cs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ public void TryToSeeIfSpiIsSupported()
3636
public void CheckSpiConectionSettings()
3737
{
3838
// Arrange
39-
SpiConnectionSettings connectinSettings = new SpiConnectionSettings(1);
40-
connectinSettings.ChipSelectLine = 12;
39+
SpiConnectionSettings connectinSettings = new SpiConnectionSettings(1, 12);
4140
connectinSettings.ChipSelectLineActiveState = PinValue.High;
4241
connectinSettings.ClockFrequency = 1_000_000;
4342
connectinSettings.DataBitLength = 8;
@@ -117,18 +116,13 @@ public void FullTransferUshort()
117116
}
118117

119118
[TestMethod]
120-
public void SpiBusInfo()
119+
public void SpiBusInfo_Tests()
121120
{
122121
// Arrange
123122
SpiBusInfo spiBusInfo = SpiDevice.GetBusInfo(1);
124-
Debug.WriteLine($"{nameof(spiBusInfo.ChipSelectLineCount)}: {spiBusInfo.ChipSelectLineCount}");
123+
125124
Debug.WriteLine($"{nameof(spiBusInfo.MaxClockFrequency)}: {spiBusInfo.MaxClockFrequency}");
126125
Debug.WriteLine($"{nameof(spiBusInfo.MinClockFrequency)}: {spiBusInfo.MinClockFrequency}");
127-
Debug.WriteLine($"{nameof(spiBusInfo.SupportedDataBitLengths)}: ");
128-
foreach (var data in spiBusInfo.SupportedDataBitLengths)
129-
{
130-
Debug.WriteLine($" {data}");
131-
}
132126
}
133127

134128
[TestMethod]

0 commit comments

Comments
 (0)