mirror of
https://github.com/italicsjenga/rp-hal-boards.git
synced 2025-01-23 09:46:33 +11:00
Fix PIO rx fifo status (#367)
* Implement embedded-hal 1.0.0-alpha.8 traits * Add comment about missing SPI traits * Fix doc of rx.is_empty() and add rx.is_full()
This commit is contained in:
parent
99dfeaf6f2
commit
e5897ca7a4
1 changed files with 6 additions and 1 deletions
|
@ -1138,10 +1138,15 @@ impl<SM: ValidStateMachine> Rx<SM> {
|
||||||
.modify(|_, w| w.autopush().bit(enable))
|
.modify(|_, w| w.autopush().bit(enable))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Indicate if the tx FIFO is full
|
/// Indicate if the rx FIFO is empty
|
||||||
pub fn is_empty(&self) -> bool {
|
pub fn is_empty(&self) -> bool {
|
||||||
self.register_block().fstat.read().rxempty().bits() & (1 << SM::id()) != 0
|
self.register_block().fstat.read().rxempty().bits() & (1 << SM::id()) != 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Indicate if the rx FIFO is full
|
||||||
|
pub fn is_full(&self) -> bool {
|
||||||
|
self.register_block().fstat.read().rxfull().bits() & (1 << SM::id()) != 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// PIO TX FIFO handle.
|
/// PIO TX FIFO handle.
|
||||||
|
|
Loading…
Add table
Reference in a new issue