From cb1b240d8bad85ea58e5ef3c33b6f340fa898847 Mon Sep 17 00:00:00 2001 From: xoviat Date: Sat, 24 Apr 2021 17:10:51 -0500 Subject: [PATCH] stm32: fix spi/write --- embassy-stm32/src/f4/spi.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/embassy-stm32/src/f4/spi.rs b/embassy-stm32/src/f4/spi.rs index 990fc5e9..d02c7810 100644 --- a/embassy-stm32/src/f4/spi.rs +++ b/embassy-stm32/src/f4/spi.rs @@ -283,12 +283,11 @@ where for i in 0..(static_buf.len() - 1) { let byte = static_buf[i]; loop { - let fut = InterruptFuture::new(&mut self.spi_int); match write_sr(&spi, byte) { Ok(()) => break, _ => {} } - fut.await; + InterruptFuture::new(&mut self.spi_int).await; } }