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 db59e47 commit 1cfc951Copy full SHA for 1cfc951
cores/rp2040/SerialPIO.cpp
@@ -355,10 +355,10 @@ void SerialPIO::flush() {
355
return;
356
}
357
while (!pio_sm_is_tx_fifo_empty(_txPIO, _txSM)) {
358
- delay(1); // Wait for all FIFO to be read
+ /* noop */ // Busy wait for all FIFO to be read
359
360
// Could have 1 byte being transmitted, so wait for bit times
361
- delay((1000 * (_txBits + 1)) / _baud);
+ delayMicroseconds((1000000 * (_txBits + 3 /* start + stop + parity */)) / _baud);
362
363
364
size_t SerialPIO::write(uint8_t c) {
0 commit comments