Skip to content

Commit 291a6af

Browse files
authored
Merge pull request #63 from manchoz/manchoz_uart_write_buffer
Fix UART::write(const uint8_t *, ...) return size
2 parents b3e5b1e + a570a64 commit 291a6af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/arduino/Serial.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ size_t UART::write(const uint8_t* c, size_t len) {
125125
while (!_serial->writeable()) {}
126126
_serial->set_blocking(true);
127127
int ret = _serial->write(c, len);
128-
return ret == -1 ? 0 : 1;
128+
return ret == -1 ? 0 : len;
129129
}
130130

131131
void UART::block_tx(int _a) {

0 commit comments

Comments
 (0)