From 620d182c5a10f1e753468d9166d9d7592c992ae7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Schulz-Ansres?= Date: Tue, 14 May 2024 13:53:02 +0200 Subject: [PATCH] Use read_busy function --- embassy-stm32/src/dsihost.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/embassy-stm32/src/dsihost.rs b/embassy-stm32/src/dsihost.rs index af020f0ff..f1c737fdc 100644 --- a/embassy-stm32/src/dsihost.rs +++ b/embassy-stm32/src/dsihost.rs @@ -332,6 +332,7 @@ impl<'d, T: Instance> DsiHost<'d, T> { */ Ok(()) } + fn wait_command_fifo_empty(&self) -> Result<(), Error> { for _ in 1..1000 { // Wait for Command FIFO empty @@ -357,7 +358,7 @@ impl<'d, T: Instance> DsiHost<'d, T> { fn wait_read_not_busy(&self) -> Result<(), Error> { for _ in 1..1000 { // Wait for read not busy - if !T::regs().gpsr().read().rcb() { + if !self.read_busy() { return Ok(()); } blocking_delay_ms(1); @@ -376,7 +377,7 @@ impl<'d, T: Instance> DsiHost<'d, T> { Err(Error::FifoTimeout) } - fn packet_size_error(&self) -> bool { + fn _packet_size_error(&self) -> bool { T::regs().isr1().read().pse() }