From 2d2553033ec91d518f0d4f43b92ac87d290295d3 Mon Sep 17 00:00:00 2001 From: Reece Stevens Date: Wed, 4 Apr 2018 01:13:23 -0500 Subject: [PATCH] Send dummy byte prior to reading SPI --- f4/src/spi.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/f4/src/spi.rs b/f4/src/spi.rs index e60763e..a76a595 100644 --- a/f4/src/spi.rs +++ b/f4/src/spi.rs @@ -109,6 +109,7 @@ macro_rules! spi { } fn read(&mut self) -> nb::Result { + self.send(0x00); let spi = &self.spi; if spi.sr.read().ovr().bit_is_set() { Err(nb::Error::Other(Error::Overrun))