Skip to content

Commit 4fff729

Browse files
arkaptherealprof
authored andcommitted
make is_rxne() borrow rather than consume the serial (#84)
1 parent 9b88286 commit 4fff729

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/serial.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1668,7 +1668,7 @@ macro_rules! halUsartImpl {
16681668
}
16691669

16701670
/// Return true if the rx register is not empty (and can be read)
1671-
pub fn is_rxne(self) -> bool {
1671+
pub fn is_rxne(& self) -> bool {
16721672
unsafe { (*$USARTX::ptr()).sr.read().rxne().bit_is_set() }
16731673
}
16741674

0 commit comments

Comments
 (0)