mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 08:09:19 +02:00
use uart nonblocking write
This commit is contained in:
2
uart.cpp
2
uart.cpp
@@ -301,7 +301,7 @@ void uart_input::poll()
|
|||||||
WriteLog("uart: tx: " + std::string(buf));
|
WriteLog("uart: tx: " + std::string(buf));
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = sp_blocking_write(port, (void*)buffer.data(), buffer.size(), 0);
|
ret = sp_nonblocking_write(port, (void*)buffer.data(), buffer.size());
|
||||||
if (ret != buffer.size())
|
if (ret != buffer.size())
|
||||||
throw std::runtime_error("uart: failed to write to port");
|
throw std::runtime_error("uart: failed to write to port");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user