Skip to content

Commit 8e5078c

Browse files
Improve intellisense comment for watchchar event (#83)
***NO_CI***
1 parent 3299088 commit 8e5078c

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ private void DataReceivedNormalEvent(object sender, SerialDataReceivedEventArgs
133133
#### WatchChar
134134

135135

136-
.NET nanoFramework has a specific API to watch for a specific character if present at the end of the transmission.
136+
.NET nanoFramework has a custom API event to watch for a specific character if present during the transmission.
137137

138138
```csharp
139139
port.WatchChar = '\r';
@@ -144,7 +144,7 @@ private void DataReceivedNormalEvent(object sender, SerialDataReceivedEventArgs
144144
{
145145
if (e.EventType == SerialData.WatchChar)
146146
{
147-
// We have our special character at the end of the transmission
147+
// The specified character was detected when reading from the serialport.
148148
}
149149
}
150150
```

System.IO.Ports/SerialData.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ namespace System.IO.Ports
88
/// <summary>
99
/// Specifies the type of character that was received on the serial port of the <see cref="SerialPort"/> object.
1010
/// </summary>
11+
/// <remarks>
12+
/// This enumeration is used with the <see cref="SerialPort.DataReceived"/> event.
13+
/// You examine the type of character that was received by retrieving the value of the <see cref="SerialDataReceivedEventArgs.EventType"/> property.
14+
/// The EventType property contains one of the values from the `SerialData` enumeration.
15+
/// </remarks>
1116
public enum SerialData
1217
{
1318
/// <summary>
@@ -16,8 +21,11 @@ public enum SerialData
1621
Chars = 1,
1722

1823
/// <summary>
19-
/// The end of file character was received and placed in the input buffer.
24+
/// The `watch` character was received and placed in the input buffer.
2025
/// </summary>
26+
/// <remarks>
27+
/// This is only supported on .Net nanoFramework.
28+
/// </remarks>
2129
WatchChar = 2
2230
}
2331
}

0 commit comments

Comments
 (0)