Skip to content

Commit 69d0999

Browse files
authored
release-v1.0.3
\r\n***PUBLISH_RELEASE***
2 parents 7e83847 + e34951c commit 69d0999

File tree

14 files changed

+354
-65
lines changed

14 files changed

+354
-65
lines changed

.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 <[email protected]>'
49-
branch: ${{ env.BRANCH_NAME }}
50-
path: main
51-
labels: |
52-
Type: dependencies
32+
solutionsToCheck: 'nanoFramework.System.IO.Ports.sln'

CHANGELOG.md

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

33
## [v1.0.2-preview.3](https://github.com/nanoframework/System.IO.Ports/tree/v1.0.2-preview.3) (2021-12-03)
44

5+
[Full Changelog](https://github.com/nanoframework/System.IO.Ports/compare/v1.0.3-preview.44...HEAD)
6+
7+
**Documentation and other chores:**
8+
9+
- Update 1 NuGet dependencies [\#74](https://github.com/nanoframework/System.IO.Ports/pull/74)
10+
11+
## [v1.0.3-preview.44](https://github.com/nanoframework/System.IO.Ports/tree/v1.0.3-preview.44) (2022-03-28)
12+
13+
[Full Changelog](https://github.com/nanoframework/System.IO.Ports/compare/v1.0.3-preview.42...v1.0.3-preview.44)
14+
15+
**Documentation and other chores:**
16+
17+
- Update 3 NuGet dependencies [\#73](https://github.com/nanoframework/System.IO.Ports/pull/73)
18+
19+
## [v1.0.3-preview.42](https://github.com/nanoframework/System.IO.Ports/tree/v1.0.3-preview.42) (2022-03-28)
20+
21+
[Full Changelog](https://github.com/nanoframework/System.IO.Ports/compare/v1.0.3-preview.39...v1.0.3-preview.42)
22+
23+
**Documentation and other chores:**
24+
25+
- Update 5 NuGet dependencies [\#71](https://github.com/nanoframework/System.IO.Ports/pull/71)
26+
- Update 1 NuGet dependencies [\#69](https://github.com/nanoframework/System.IO.Ports/pull/69)
27+
28+
## [v1.0.3-preview.39](https://github.com/nanoframework/System.IO.Ports/tree/v1.0.3-preview.39) (2022-03-17)
29+
30+
[Full Changelog](https://github.com/nanoframework/System.IO.Ports/compare/v1.0.3-preview.37...v1.0.3-preview.39)
31+
32+
**Documentation and other chores:**
33+
34+
- Update 4 NuGet dependencies [\#68](https://github.com/nanoframework/System.IO.Ports/pull/68)
35+
36+
## [v1.0.3-preview.37](https://github.com/nanoframework/System.IO.Ports/tree/v1.0.3-preview.37) (2022-03-14)
37+
38+
[Full Changelog](https://github.com/nanoframework/System.IO.Ports/compare/v1.0.3-preview.35...v1.0.3-preview.37)
39+
40+
**Documentation and other chores:**
41+
42+
- Update 1 NuGet dependencies [\#66](https://github.com/nanoframework/System.IO.Ports/pull/66)
43+
44+
## [v1.0.3-preview.35](https://github.com/nanoframework/System.IO.Ports/tree/v1.0.3-preview.35) (2022-03-14)
45+
46+
[Full Changelog](https://github.com/nanoframework/System.IO.Ports/compare/v1.0.3-preview.33...v1.0.3-preview.35)
47+
48+
**Documentation and other chores:**
49+
50+
- Update 5 NuGet dependencies [\#65](https://github.com/nanoframework/System.IO.Ports/pull/65)
51+
52+
## [v1.0.3-preview.33](https://github.com/nanoframework/System.IO.Ports/tree/v1.0.3-preview.33) (2022-02-24)
53+
54+
[Full Changelog](https://github.com/nanoframework/System.IO.Ports/compare/v1.0.3-preview.29...v1.0.3-preview.33)
55+
56+
**Implemented enhancements:**
57+
58+
- Add ReadBufferSize and WriteBufferSize [\#62](https://github.com/nanoframework/System.IO.Ports/pull/62)
59+
60+
**Documentation and other chores:**
61+
62+
- Update 1 NuGet dependencies [\#61](https://github.com/nanoframework/System.IO.Ports/pull/61)
63+
64+
## [v1.0.3-preview.29](https://github.com/nanoframework/System.IO.Ports/tree/v1.0.3-preview.29) (2022-02-17)
65+
66+
[Full Changelog](https://github.com/nanoframework/System.IO.Ports/compare/v1.0.3-preview.25...v1.0.3-preview.29)
67+
68+
**Documentation and other chores:**
69+
70+
- Update 4 NuGet dependencies [\#60](https://github.com/nanoframework/System.IO.Ports/pull/60)
71+
- Update 3 NuGet dependencies [\#59](https://github.com/nanoframework/System.IO.Ports/pull/59)
72+
73+
## [v1.0.3-preview.25](https://github.com/nanoframework/System.IO.Ports/tree/v1.0.3-preview.25) (2022-02-08)
74+
75+
[Full Changelog](https://github.com/nanoframework/System.IO.Ports/compare/v1.0.3-preview.23...v1.0.3-preview.25)
76+
77+
**Implemented enhancements:**
78+
79+
- Implement InvertSignalLevels on SerialPort [\#57](https://github.com/nanoframework/System.IO.Ports/pull/57)
80+
81+
## [v1.0.3-preview.23](https://github.com/nanoframework/System.IO.Ports/tree/v1.0.3-preview.23) (2022-02-05)
82+
83+
[Full Changelog](https://github.com/nanoframework/System.IO.Ports/compare/v1.0.3-preview.21...v1.0.3-preview.23)
84+
85+
**Documentation and other chores:**
86+
87+
- Update 1 NuGet dependencies [\#58](https://github.com/nanoframework/System.IO.Ports/pull/58)
88+
89+
## [v1.0.3-preview.21](https://github.com/nanoframework/System.IO.Ports/tree/v1.0.3-preview.21) (2022-02-04)
90+
91+
[Full Changelog](https://github.com/nanoframework/System.IO.Ports/compare/v1.0.3-preview.18...v1.0.3-preview.21)
92+
93+
**Documentation and other chores:**
94+
95+
- Update 1 NuGet dependencies [\#56](https://github.com/nanoframework/System.IO.Ports/pull/56)
96+
97+
## [v1.0.3-preview.18](https://github.com/nanoframework/System.IO.Ports/tree/v1.0.3-preview.18) (2022-01-28)
98+
99+
[Full Changelog](https://github.com/nanoframework/System.IO.Ports/compare/v1.0.3-preview.16...v1.0.3-preview.18)
100+
101+
**Documentation and other chores:**
102+
103+
- Update 1 NuGet dependencies [\#55](https://github.com/nanoframework/System.IO.Ports/pull/55)
104+
105+
## [v1.0.3-preview.16](https://github.com/nanoframework/System.IO.Ports/tree/v1.0.3-preview.16) (2022-01-28)
106+
107+
[Full Changelog](https://github.com/nanoframework/System.IO.Ports/compare/v1.0.3-preview.14...v1.0.3-preview.16)
108+
109+
**Documentation and other chores:**
110+
111+
- Update 1 NuGet dependencies [\#54](https://github.com/nanoframework/System.IO.Ports/pull/54)
112+
113+
## [v1.0.3-preview.14](https://github.com/nanoframework/System.IO.Ports/tree/v1.0.3-preview.14) (2022-01-28)
114+
115+
[Full Changelog](https://github.com/nanoframework/System.IO.Ports/compare/v1.0.3-preview.12...v1.0.3-preview.14)
116+
117+
**Documentation and other chores:**
118+
119+
- Update 4 NuGet dependencies [\#53](https://github.com/nanoframework/System.IO.Ports/pull/53)
120+
121+
## [v1.0.3-preview.12](https://github.com/nanoframework/System.IO.Ports/tree/v1.0.3-preview.12) (2022-01-21)
122+
123+
[Full Changelog](https://github.com/nanoframework/System.IO.Ports/compare/v1.0.3-preview.10...v1.0.3-preview.12)
124+
125+
**Documentation and other chores:**
126+
127+
- Update 1 NuGet dependencies [\#52](https://github.com/nanoframework/System.IO.Ports/pull/52)
128+
129+
## [v1.0.3-preview.10](https://github.com/nanoframework/System.IO.Ports/tree/v1.0.3-preview.10) (2022-01-21)
130+
131+
[Full Changelog](https://github.com/nanoframework/System.IO.Ports/compare/v1.0.3-preview.8...v1.0.3-preview.10)
132+
133+
**Documentation and other chores:**
134+
135+
- Update 1 NuGet dependencies [\#51](https://github.com/nanoframework/System.IO.Ports/pull/51)
136+
137+
## [v1.0.3-preview.8](https://github.com/nanoframework/System.IO.Ports/tree/v1.0.3-preview.8) (2022-01-21)
138+
139+
[Full Changelog](https://github.com/nanoframework/System.IO.Ports/compare/v1.0.3-preview.6...v1.0.3-preview.8)
140+
141+
**Documentation and other chores:**
142+
143+
- Update 3 NuGet dependencies [\#50](https://github.com/nanoframework/System.IO.Ports/pull/50)
144+
145+
## [v1.0.3-preview.6](https://github.com/nanoframework/System.IO.Ports/tree/v1.0.3-preview.6) (2022-01-12)
146+
147+
[Full Changelog](https://github.com/nanoframework/System.IO.Ports/compare/v1.0.3-preview.4...v1.0.3-preview.6)
148+
149+
**Documentation and other chores:**
150+
151+
- Update 1 NuGet dependencies [\#47](https://github.com/nanoframework/System.IO.Ports/pull/47)
152+
153+
## [v1.0.3-preview.4](https://github.com/nanoframework/System.IO.Ports/tree/v1.0.3-preview.4) (2021-12-29)
154+
155+
[Full Changelog](https://github.com/nanoframework/System.IO.Ports/compare/v1.0.3-preview.3...v1.0.3-preview.4)
156+
157+
**Documentation and other chores:**
158+
159+
- Update 1 nuget dependencies [\#46](https://github.com/nanoframework/System.IO.Ports/pull/46)
160+
161+
## [v1.0.3-preview.3](https://github.com/nanoframework/System.IO.Ports/tree/v1.0.3-preview.3) (2021-12-28)
162+
163+
[Full Changelog](https://github.com/nanoframework/System.IO.Ports/compare/v1.0.2...v1.0.3-preview.3)
164+
165+
**Documentation and other chores:**
166+
167+
- Bumps nanoFramework.Runtime.Events from 1.9.2 to 1.10.0-preview.1 [\#45](https://github.com/nanoframework/System.IO.Ports/pull/45)
168+
169+
## [v1.0.2](https://github.com/nanoframework/System.IO.Ports/tree/v1.0.2) (2021-12-03)
170+
171+
[Full Changelog](https://github.com/nanoframework/System.IO.Ports/compare/v1.0.2-preview.3...v1.0.2)
172+
173+
## [v1.0.2-preview.3](https://github.com/nanoframework/System.IO.Ports/tree/v1.0.2-preview.3) (2021-12-03)
174+
5175
[Full Changelog](https://github.com/nanoframework/System.IO.Ports/compare/v1.0.1...v1.0.2-preview.3)
6176

7177
**Documentation and other chores:**

NuGet.Config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<packageSources>
4-
<add key="Azure Artifacts nanoFramework dev" value="https://pkgs.dev.azure.com/nanoframework/feed/_packaging/sandbox/nuget/v3/index.json" protocolVersion="3" />
54
<add key="NuGet" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
5+
<add key="Azure Artifacts nanoFramework dev" value="https://pkgs.dev.azure.com/nanoframework/feed/_packaging/sandbox/nuget/v3/index.json" protocolVersion="3" />
66
</packageSources>
77
</configuration>

System.IO.Ports/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
////////////////////////////////////////////////////////////////
1414
// update this whenever the native assembly signature changes //
15-
[assembly: AssemblyNativeVersion("100.1.2.0")]
15+
[assembly: AssemblyNativeVersion("100.1.4.0")]
1616
////////////////////////////////////////////////////////////////
1717

1818
// Setting ComVisible to false makes the types in this assembly not visible

System.IO.Ports/SerialPort.cs

Lines changed: 103 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public sealed class SerialPort : IDisposable
4949
private SerialDataReceivedEventHandler _callbacksDataReceivedEvent = null;
5050
private SerialStream _stream;
5151
private string _newLine;
52+
private int _bufferSize = 256;
5253

5354
/// <summary>
5455
/// Initializes a new instance of the <see cref="SerialPort"/> class using the
@@ -101,6 +102,7 @@ public SerialPort(
101102
/// <exception cref="InvalidOperationException">The specified port on the current instance of the <see cref="SerialPort"/>.
102103
/// is already open.</exception>
103104
/// <exception cref="ArgumentException">One (or more) of the properties set to configure this <see cref="SerialPort"/> are invalid.</exception>
105+
/// <exception cref="OutOfMemoryException">Failed to allocate the request amount of memory for the work buffer.</exception>
104106
public void Open()
105107
{
106108
if (!_opened)
@@ -464,6 +466,106 @@ public extern int BytesToRead
464466
get;
465467
}
466468

469+
/// <summary>
470+
/// Gets or sets the logic level of the RX and TX signals.
471+
/// </summary>
472+
/// <exception cref="InvalidOperationException">Trying to set this property when the <see cref="SerialPort"/> is already opened and the driver doesn't support it.</exception>
473+
/// <exception cref="NotSupportedException">Trying to set this property on a target that does not support signal inversion.</exception>
474+
/// <remarks>
475+
/// When the signal levels are not inverted (reads <see langword="false"/>) the RX, TX pins use the standard logic levels (VDD = 1/idle, GND = 0/mark).
476+
/// Setting this property to <see langword="true"/>, will invert those signal levels, which will become inverted (VDD = 0/mark, GND= 1/idle).
477+
/// Some targets may not support this setting and accessing it will throw a <see cref="NotSupportedException"/> exception.
478+
/// This is a .NET nanoFramework property only. Doesn't exist on other .NET platforms.
479+
/// </remarks>
480+
public extern bool InvertSignalLevels
481+
{
482+
[MethodImpl(MethodImplOptions.InternalCall)]
483+
get;
484+
485+
[MethodImpl(MethodImplOptions.InternalCall)]
486+
set;
487+
}
488+
489+
/// <summary>
490+
/// Gets or sets the size of the SerialPort input buffer.
491+
/// </summary>
492+
/// <value>The size of the input buffer. The default is 256.</value>
493+
/// <exception cref="ArgumentOutOfRangeException">The <see cref="ReadBufferSize"/> value is less than or equal to zero.</exception>
494+
/// <exception cref="InvalidOperationException">The <see cref="ReadBufferSize"/> property was set while the stream was open.</exception>
495+
/// <remarks>
496+
/// <para>
497+
/// Implementation of this property for .NET nanoFramework it's slightly different from .NET.
498+
/// </para>
499+
/// <para>
500+
/// - There is only one work buffer which is used for transmission and reception.
501+
/// </para>
502+
/// <para>
503+
/// - When the <see cref="SerialPort"/> is <see cref="Open"/> the driver will try to allocate the requested memory for the buffer. On failure to do so, an <see cref="OutOfMemoryException"/> exception will be throw and the <see cref="Open"/> operation will fail.
504+
/// </para>
505+
/// </remarks>
506+
public int ReadBufferSize
507+
{
508+
set
509+
{
510+
if (value <= 0)
511+
{
512+
throw new ArgumentOutOfRangeException();
513+
}
514+
515+
if (_opened)
516+
{
517+
throw new InvalidOperationException();
518+
}
519+
520+
_bufferSize = value;
521+
}
522+
523+
get
524+
{
525+
return _bufferSize;
526+
}
527+
}
528+
529+
/// <summary>
530+
/// Gets or sets the size of the serial port output buffer.
531+
/// </summary>
532+
/// <value>The size of the output buffer. The default is 256.</value>
533+
/// <exception cref="ArgumentOutOfRangeException">The <see cref="WriteBufferSize"/> value is less than or equal to zero.</exception>
534+
/// <exception cref="InvalidOperationException">The <see cref="WriteBufferSize"/> property was set while the stream was open.</exception>
535+
/// <remarks>
536+
/// <para>
537+
/// Implementation of this property for .NET nanoFramework it's slightly different from .NET.
538+
/// </para>
539+
/// <para>
540+
/// - There is only one work buffer which is used for transmission and reception.
541+
/// </para>
542+
/// <para>
543+
/// - When the <see cref="SerialPort"/> is <see cref="Open"/> the driver will try to allocate the requested memory for the buffer. On failure to do so, an <see cref="OutOfMemoryException"/> exception will be throw and the <see cref="Open"/> operation will fail.
544+
/// </para>
545+
/// </remarks>
546+
public int WriteBufferSize
547+
{
548+
set
549+
{
550+
if (value <= 0)
551+
{
552+
throw new ArgumentOutOfRangeException();
553+
}
554+
555+
if (_opened)
556+
{
557+
throw new InvalidOperationException();
558+
}
559+
560+
_bufferSize = value;
561+
}
562+
563+
get
564+
{
565+
return _bufferSize;
566+
}
567+
}
568+
467569
#endregion
468570

469571
/// <summary>
@@ -732,7 +834,7 @@ public void Dispose()
732834

733835
[MethodImpl(MethodImplOptions.InternalCall)]
734836
internal static extern string GetDeviceSelector();
735-
837+
736838
#endregion
737839
}
738840
}

System.IO.Ports/SerialStream.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ public override int Read(byte[] buffer, int offset, int count)
3636
return _serial.Read(buffer, offset, count);
3737
}
3838

39+
public override int Read(SpanByte buffer)
40+
{
41+
throw new NotImplementedException();
42+
}
43+
3944
public override long Seek(long offset, SeekOrigin origin)
4045
{
4146
throw new NotSupportedException();

0 commit comments

Comments
 (0)