From f8b124b78cd9855a09499f23dbf38c84685f6d60 Mon Sep 17 00:00:00 2001 From: Carlo Parata Date: Thu, 3 Aug 2017 10:49:13 +0200 Subject: [PATCH] Fix possible issue on serial ports --- cores/arduino/HardwareSerial.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cores/arduino/HardwareSerial.cpp b/cores/arduino/HardwareSerial.cpp index d15e5c5aff..dc2306a42d 100644 --- a/cores/arduino/HardwareSerial.cpp +++ b/cores/arduino/HardwareSerial.cpp @@ -70,14 +70,13 @@ int HardwareSerial::_tx_complete_irq(serial_t* obj) { // If interrupts are enabled, there must be more data in the output // buffer. Send the next byte - unsigned char c = obj->tx_buff[obj->tx_tail]; obj->tx_tail = (obj->tx_tail + 1) % SERIAL_TX_BUFFER_SIZE; if (obj->tx_head == obj->tx_tail) { return -1; } - return c; + return 0; } // Public Methods //////////////////////////////////////////////////////////////