diff options
author | Dave Madison <dmadison@users.noreply.github.com> | 2022-02-22 02:32:00 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-22 02:32:00 -0500 |
commit | d52b6ea456dd145025659359847e3ba8b58b5a27 (patch) | |
tree | 7c106c4e741e47ef5dd9f4f45529fd6a6010a896 /libraries/SoftwareSerial | |
parent | f47a97522dc28c16c432422e3085035de69cfaf6 (diff) | |
parent | 6f5881438af5b416fe83b0721a51215b9833498c (diff) |
Merge pull request #14 from dmadison/upstream-1.8.4
Merge upstream tag '1.8.4'
Diffstat (limited to 'libraries/SoftwareSerial')
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)
|