Skip to content

Commit 3980bcd

Browse files
arkaptherealprof
authored andcommitted
Accessor for SPI OVR flag (#87)
* add accessor for spi OVR flag
1 parent 0f09d5b commit 3980bcd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/spi.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -831,6 +831,12 @@ macro_rules! hal {
831831
self.spi.sr.read().modf().bit_is_set()
832832
}
833833

834+
/// Return `true` if the OVR flag is set, i.e. new data has been received
835+
/// while the receive data register was already filled.
836+
pub fn is_ovr(&self) -> bool {
837+
self.spi.sr.read().ovr().bit_is_set()
838+
}
839+
834840
pub fn free(self) -> ($SPIX, PINS) {
835841
(self.spi, self.pins)
836842
}

0 commit comments

Comments
 (0)