Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 65e63bf

Browse files
author
Bernhard Nebel
committed
Inserted cast to unsigned int in available method in order to avoid call to __divmodhi4
1 parent 44dc454 commit 65e63bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎libraries/SoftwareSerial/src/SoftwareSerial.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ int SoftwareSerial::available()
409409
if (!isListening())
410410
return 0;
411411

412-
return (_receive_buffer_tail + _SS_MAX_RX_BUFF - _receive_buffer_head) % _SS_MAX_RX_BUFF;
412+
return ((unsignedint)(_receive_buffer_tail + _SS_MAX_RX_BUFF - _receive_buffer_head)) % _SS_MAX_RX_BUFF;
413413
}
414414

415415
size_t SoftwareSerial::write(uint8_t b)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /