Skip to content

Commit f8b124b

Browse files
committed
Fix possible issue on serial ports
1 parent 980a797 commit f8b124b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

cores/arduino/HardwareSerial.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,13 @@ int HardwareSerial::_tx_complete_irq(serial_t* obj)
7070
{
7171
// If interrupts are enabled, there must be more data in the output
7272
// buffer. Send the next byte
73-
unsigned char c = obj->tx_buff[obj->tx_tail];
7473
obj->tx_tail = (obj->tx_tail + 1) % SERIAL_TX_BUFFER_SIZE;
7574

7675
if (obj->tx_head == obj->tx_tail) {
7776
return -1;
7877
}
7978

80-
return c;
79+
return 0;
8180
}
8281

8382
// Public Methods //////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)