mirror of
https://github.com/italicsjenga/rp-hal-boards.git
synced 2024-12-23 20:51:31 +11:00
pio: Rename read_rx/write_tx to read/write.
This commit is contained in:
parent
207f5aebdb
commit
2fc42e07f2
|
@ -626,7 +626,7 @@ impl<SM: ValidStateMachine> Rx<SM> {
|
|||
/// Get the next element from RX FIFO.
|
||||
///
|
||||
/// Returns `None` if the FIFO is empty.
|
||||
pub fn read_rx(&mut self) -> Option<u32> {
|
||||
pub fn read(&mut self) -> Option<u32> {
|
||||
// Safety: The register is never written by software.
|
||||
let is_empty = unsafe { &*self.block }.fstat.read().rxempty().bits() & (1 << SM::id()) != 0;
|
||||
|
||||
|
@ -649,7 +649,7 @@ impl<SM: ValidStateMachine> Tx<SM> {
|
|||
/// Write an element to TX FIFO.
|
||||
///
|
||||
/// Returns `true` if the value was written to FIFO, `false` otherwise.
|
||||
pub fn write_tx(&mut self, value: u32) -> bool {
|
||||
pub fn write(&mut self, value: u32) -> bool {
|
||||
// Safety: The register is never written by software.
|
||||
let is_full = unsafe { &*self.block }.fstat.read().txfull().bits() & (1 << SM::id()) != 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue