Merge pull request #149 from xoviat/spi

stm32: fix spi/write
This commit is contained in:
Thales 2021-04-25 22:08:38 -03:00 committed by GitHub
commit 1f2551d7cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
}
}