Communication: Add pause feature

Removed redirect read
This commit is contained in:
Yasser Yassine
2024-05-23 21:23:45 +00:00
parent 9a1cd1124d
commit 659fcf633c
13 changed files with 99 additions and 70 deletions
+1 -1
View File
@@ -242,7 +242,7 @@ void FirmIO::readTask() {
// Translate the physical address back to our virtual address space
uint8_t* addr = reinterpret_cast<uint8_t*>(msg.payload.data.addr - PHY_ADDR_BASE + vbase);
while (!readBuffer.write(addr, msg.payload.data.len)) {
while (!writeToReadBuffer(addr, msg.payload.data.len)) {
std::this_thread::sleep_for(std::chrono::milliseconds(1)); // back-off so reading thread can empty the buffer
if (closing || isDisconnected()) {
break;