Struct rp2040_hal::sio::SioFifo
source · pub struct SioFifo { /* private fields */ }
Expand description
Marker struct for ownership of SIO FIFO
Implementations§
source§impl SioFifo
impl SioFifo
sourcepub fn is_read_ready(&mut self) -> bool
pub fn is_read_ready(&mut self) -> bool
Check if the inter-core FIFO has valid data for reading.
Returning true
means there is valid data, false
means it is empty
and you must not read from it.
sourcepub fn is_write_ready(&mut self) -> bool
pub fn is_write_ready(&mut self) -> bool
Check if the inter-core FIFO is ready to receive data.
Returning true
means there is room, false
means it is full and you
must not write to it.
sourcepub fn write(&mut self, value: u32)
pub fn write(&mut self, value: u32)
Write to the inter-core FIFO.
You must ensure the FIFO has space by calling is_write_ready
sourcepub fn read(&mut self) -> Option<u32>
pub fn read(&mut self) -> Option<u32>
Read from the inter-core FIFO.
Will return Some(data)
, or None
if the FIFO is empty.
sourcepub fn write_blocking(&mut self, value: u32)
pub fn write_blocking(&mut self, value: u32)
Push to the FIFO, spinning if there’s no space.
sourcepub fn read_blocking(&mut self) -> u32
pub fn read_blocking(&mut self) -> u32
Pop from the FIFO, spinning if there’s currently no data.
Auto Trait Implementations§
impl RefUnwindSafe for SioFifo
impl Send for SioFifo
impl Sync for SioFifo
impl Unpin for SioFifo
impl UnwindSafe for SioFifo
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more