We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98bee29 commit 38f7fcaCopy full SHA for 38f7fca
cores/arduino/ard_sup/uart/ap3_uart.cpp
@@ -151,7 +151,12 @@ size_t Uart::write(const uint8_t *buffer, size_t size)
151
152
//Transfer any remaining bytes into ring buffer
153
for (int x = 0; x < size; x++)
154
+ {
155
+ //If TX ring buffer is full, begin blocking
156
+ while (_tx_buffer.availableForStore() == 0)
157
+ delay(1);
158
_tx_buffer.store_char(buffer[x]);
159
+ }
160
161
return ui32BytesWritten; //Return number of bytes pushed to UART hardware
162
}
0 commit comments