Skip to content

Commit

Permalink
Send dummy byte prior to reading SPI
Browse files Browse the repository at this point in the history
  • Loading branch information
ReeceStevens committed Apr 4, 2018
1 parent a51eac1 commit 2d25530
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions f4/src/spi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ macro_rules! spi {
}

fn read(&mut self) -> nb::Result<u8, Error> {
self.send(0x00);
let spi = &self.spi;
if spi.sr.read().ovr().bit_is_set() {
Err(nb::Error::Other(Error::Overrun))
Expand Down

0 comments on commit 2d25530

Please sign in to comment.