From 3f8736e87210b2c73e94b6bda47bd4e18a26d845 Mon Sep 17 00:00:00 2001 From: Jan Niehusmann Date: Sun, 21 Apr 2024 21:24:15 +0000 Subject: [PATCH] Add a comment to the pio rx fifo pull function --- embassy-rp/src/pio/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/embassy-rp/src/pio/mod.rs b/embassy-rp/src/pio/mod.rs index 2e5c57a26..1f7adbda3 100644 --- a/embassy-rp/src/pio/mod.rs +++ b/embassy-rp/src/pio/mod.rs @@ -324,6 +324,10 @@ impl<'d, PIO: Instance, const SM: usize> StateMachineRx<'d, PIO, SM> { } /// Pull data from RX FIFO. + /// + /// This function doesn't check if there is data available to be read. + /// If the rx FIFO is empty, an undefined value is returned. If you only + /// want to pull if data is available, use `try_pull` instead. pub fn pull(&mut self) -> u32 { PIO::PIO.rxf(SM).read() }