Unverified Commit 6507dfef authored by Martino Facchin's avatar Martino Facchin Committed by GitHub

Merge pull request #433 from felias-fogg/master

Speed up 'available' method by inserting unsigned int cast
parents 44dc454b 65e63bf3
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment