Add the xyield macro function to yield the CPU.

This commit is contained in:
dxl committed 2026-09-02 00:02:14 +08:00
1 parent 0197fe8484
commit 3ea93dfc85
2 files changed
+10 -7

No files matched your search

+4 -3
View File
@@ -100,7 +100,8 @@ bool WaitForTxIdle(uint32_t ms_timeout) {
if (msclock() - start >= ms_timeout) {
return false;
}
msleep(1);
xyield(); // just to avoid CPU busy loop
}
}
@@ -1149,8 +1150,8 @@ bool WaitForResponseTimeoutW(uint32_t cmd, PacketResponseNG *response, size_t ms
PrintAndLogEx(INFO, "You can cancel this operation by pressing the pm3 button");
show_warning = false;
}
// just to avoid CPU busy loop:
msleep(1);
xyield(); // just to avoid CPU busy loop
}
return false;
}