Commit 65e63bf3 authored by Bernhard Nebel's avatar Bernhard Nebel

Inserted cast to unsigned int in available method in order to avoid call to __divmodhi4

parent 44dc454b
......@@ -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