From 239d137b1c47c6eb9526191add099c6a58a729a2 Mon Sep 17 00:00:00 2001 From: Berkus Decker Date: Sat, 2 Mar 2019 19:15:00 +0200 Subject: [PATCH] Reset mailbox response wait timeout on each iteration --- src/platform/mailbox.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/platform/mailbox.rs b/src/platform/mailbox.rs index 1316ba6..4286392 100644 --- a/src/platform/mailbox.rs +++ b/src/platform/mailbox.rs @@ -216,9 +216,8 @@ fn write(regs: &RegisterBlock, buf_ptr: u32, channel: u32) -> Result<()> { } fn read(regs: &RegisterBlock, expected: u32, channel: u32) -> Result<()> { - let mut count: u32 = 0; - loop { + let mut count: u32 = 0; while regs.STATUS.is_set(STATUS::EMPTY) { count += 1; if count > (1 << 25) {