diff options
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)
|