From 8b327d7bede1c1245db99daeba4e168c92c11194 Mon Sep 17 00:00:00 2001 From: per1234 Date: Wed, 26 May 2021 04:35:59 -0700 Subject: Correct typos in comments and documentation --- .../examples/SoftwareSerialExample/SoftwareSerialExample.ino | 3 +-- .../SoftwareSerial/examples/TwoPortReceive/TwoPortReceive.ino | 10 ++-------- 2 files changed, 3 insertions(+), 10 deletions(-) (limited to 'libraries/SoftwareSerial') 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(); } - - - - - - -- cgit v1.2.3-18-g5258 From 65e63bf378488dabf79e377debd4b0fa05fb3316 Mon Sep 17 00:00:00 2001 From: Bernhard Nebel Date: Mon, 18 Oct 2021 16:07:40 +0200 Subject: Inserted cast to unsigned int in available method in order to avoid call to __divmodhi4 --- libraries/SoftwareSerial/src/SoftwareSerial.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libraries/SoftwareSerial') 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) -- cgit v1.2.3-18-g5258