Skip to content

Commit

Permalink
Fix to serial receive buffer overflow handling
Browse files Browse the repository at this point in the history
  • Loading branch information
dc42 committed Jun 15, 2021
1 parent 4483ce4 commit 33741c1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/SAM4S_4E_E70/AsyncSerial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ void AsyncSerial::IrqHandler() noexcept

if (bufferOverrunPending)
{
if (txBuffer.PutItem(0x7F))
if (rxBuffer.PutItem(0x7F))
{
bufferOverrunPending = false;
(void)rxBuffer.PutItem(c); // we don't much care whether this succeeds or not
Expand Down
2 changes: 1 addition & 1 deletion src/SAME5x_C21/AsyncSerial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ void AsyncSerial::Interrupt2() noexcept

if (bufferOverrunPending)
{
if (txBuffer.PutItem(0x7F))
if (rxBuffer.PutItem(0x7F))
{
bufferOverrunPending = false;
(void)rxBuffer.PutItem(c); // we don't much care whether this succeeds or not
Expand Down

0 comments on commit 33741c1

Please sign in to comment.