aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoël Schulz-Ansres <[email protected]>2024-05-14 13:53:02 +0200
committerJoël Schulz-Ansres <[email protected]>2024-05-14 13:53:02 +0200
commit620d182c5a10f1e753468d9166d9d7592c992ae7 (patch)
treef6414e36f057b0d7baabf096763e35ddfbe807c7
parent663b5b094dbf63333ca31821b51771e5670535d7 (diff)
Use read_busy function
-rw-r--r--embassy-stm32/src/dsihost.rs5
1 files 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> {
332 */ 332 */
333 Ok(()) 333 Ok(())
334 } 334 }
335
335 fn wait_command_fifo_empty(&self) -> Result<(), Error> { 336 fn wait_command_fifo_empty(&self) -> Result<(), Error> {
336 for _ in 1..1000 { 337 for _ in 1..1000 {
337 // Wait for Command FIFO empty 338 // Wait for Command FIFO empty
@@ -357,7 +358,7 @@ impl<'d, T: Instance> DsiHost<'d, T> {
357 fn wait_read_not_busy(&self) -> Result<(), Error> { 358 fn wait_read_not_busy(&self) -> Result<(), Error> {
358 for _ in 1..1000 { 359 for _ in 1..1000 {
359 // Wait for read not busy 360 // Wait for read not busy
360 if !T::regs().gpsr().read().rcb() { 361 if !self.read_busy() {
361 return Ok(()); 362 return Ok(());
362 } 363 }
363 blocking_delay_ms(1); 364 blocking_delay_ms(1);
@@ -376,7 +377,7 @@ impl<'d, T: Instance> DsiHost<'d, T> {
376 Err(Error::FifoTimeout) 377 Err(Error::FifoTimeout)
377 } 378 }
378 379
379 fn packet_size_error(&self) -> bool { 380 fn _packet_size_error(&self) -> bool {
380 T::regs().isr1().read().pse() 381 T::regs().isr1().read().pse()
381 } 382 }
382 383