aboutsummaryrefslogtreecommitdiff
path: root/libraries/SoftwareSerial
diff options
context:
space:
mode:
authorDave Madison <dmadison@users.noreply.github.com>2022-02-22 02:32:00 -0500
committerGitHub <noreply@github.com>2022-02-22 02:32:00 -0500
commitd52b6ea456dd145025659359847e3ba8b58b5a27 (patch)
tree7c106c4e741e47ef5dd9f4f45529fd6a6010a896 /libraries/SoftwareSerial
parentf47a97522dc28c16c432422e3085035de69cfaf6 (diff)
parent6f5881438af5b416fe83b0721a51215b9833498c (diff)
Merge pull request #14 from dmadison/upstream-1.8.4
Merge upstream tag '1.8.4'
Diffstat (limited to 'libraries/SoftwareSerial')
-rw-r--r--libraries/SoftwareSerial/examples/SoftwareSerialExample/SoftwareSerialExample.ino3
-rw-r--r--libraries/SoftwareSerial/examples/TwoPortReceive/TwoPortReceive.ino10
-rw-r--r--libraries/SoftwareSerial/src/SoftwareSerial.cpp2
3 files changed, 4 insertions, 11 deletions
diff --git a/libraries/SoftwareSerial/examples/SoftwareSerialExample/SoftwareSerialExample.ino b/libraries/SoftwareSerial/examples/SoftwareSerialExample/SoftwareSerialExample.ino
index 61ce88c..061bb70 100644
--- a/libraries/SoftwareSerial/examples/SoftwareSerialExample/SoftwareSerialExample.ino
+++ b/libraries/SoftwareSerial/examples/SoftwareSerialExample/SoftwareSerialExample.ino
@@ -1,5 +1,5 @@
/*
- Software serial multple serial test
+ Software serial multiple serial test
Receives from the hardware serial, sends to software serial.
Receives from software serial, sends to hardware serial.
@@ -52,4 +52,3 @@ void loop() { // run over and over
mySerial.write(Serial.read());
}
}
-
diff --git a/libraries/SoftwareSerial/examples/TwoPortReceive/TwoPortReceive.ino b/libraries/SoftwareSerial/examples/TwoPortReceive/TwoPortReceive.ino
index 8d7f93e..d8c064b 100644
--- a/libraries/SoftwareSerial/examples/TwoPortReceive/TwoPortReceive.ino
+++ b/libraries/SoftwareSerial/examples/TwoPortReceive/TwoPortReceive.ino
@@ -1,5 +1,5 @@
/*
- Software serial multple serial test
+ Software serial multiple serial test
Receives from the two software serial ports,
sends to the hardware serial port.
@@ -56,7 +56,7 @@ void setup() {
}
void loop() {
- // By default, the last intialized port is listening.
+ // By default, the last initialized port is listening.
// when you want to listen on a port, explicitly select it:
portOne.listen();
Serial.println("Data from port one:");
@@ -83,9 +83,3 @@ void loop() {
// blank line to separate data from the two ports:
Serial.println();
}
-
-
-
-
-
-
diff --git a/libraries/SoftwareSerial/src/SoftwareSerial.cpp b/libraries/SoftwareSerial/src/SoftwareSerial.cpp
index 3163d7a..5a387ab 100644
--- a/libraries/SoftwareSerial/src/SoftwareSerial.cpp
+++ b/libraries/SoftwareSerial/src/SoftwareSerial.cpp
@@ -409,7 +409,7 @@ int SoftwareSerial::available()
if (!isListening())
return 0;
- return (_receive_buffer_tail + _SS_MAX_RX_BUFF - _receive_buffer_head) % _SS_MAX_RX_BUFF;
+ return ((unsigned int)(_receive_buffer_tail + _SS_MAX_RX_BUFF - _receive_buffer_head)) % _SS_MAX_RX_BUFF;
}
size_t SoftwareSerial::write(uint8_t b)