From e72ffa3b1f6dd7ddc13db105076c1171cf528c4b Mon Sep 17 00:00:00 2001 From: Eric Katzfey <53063038+katzfey@users.noreply.github.com> Date: Tue, 16 Sep 2025 11:40:19 -0700 Subject: [PATCH] QURT: Changed the non-blocking UART write to use the blocking write with a comment that Qurt (#25573) still needs a non-blocking write implemented. --- platforms/qurt/src/px4/SerialImpl.cpp | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/platforms/qurt/src/px4/SerialImpl.cpp b/platforms/qurt/src/px4/SerialImpl.cpp index a019244cee..312c830041 100644 --- a/platforms/qurt/src/px4/SerialImpl.cpp +++ b/platforms/qurt/src/px4/SerialImpl.cpp @@ -260,20 +260,8 @@ ssize_t SerialImpl::readAtLeast(uint8_t *buffer, size_t buffer_size, size_t char ssize_t SerialImpl::write(const void *buffer, size_t buffer_size) { - if (!_open) { - PX4_ERR("Cannot write to serial device until it has been opened"); - return -1; - } - - int ret_write = qurt_uart_write(_serial_fd, (const char *) buffer, buffer_size); - - if (ret_write < 0) { - if (errno != EAGAIN) { - PX4_ERR("%s write error %d", _port, ret_write); - } - } - - return ret_write; + // TODO: Implement a non-blocking write in Qurt + return writeBlocking(buffer, buffer_size, 0); } ssize_t SerialImpl::writeBlocking(const void *buffer, size_t buffer_size, uint32_t timeout_ms)