diff options
author | Bernhard Nebel <nebel@informatik.uni-freiburg.de> | 2021-10-18 16:07:40 +0200 |
---|---|---|
committer | Bernhard Nebel <nebel@informatik.uni-freiburg.de> | 2021-10-18 16:07:40 +0200 |
commit | 65e63bf378488dabf79e377debd4b0fa05fb3316 (patch) | |
tree | b6f7a718d674a7a39485b6856062992a335f1a3d /libraries | |
parent | 44dc454b9382298fa8be542c8c92e7944d9aa21e (diff) |
Inserted cast to unsigned int in available method in order to avoid call to __divmodhi4
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/SoftwareSerial/src/SoftwareSerial.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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)
|