diff options
| author | Dario Nieuwenhuis <[email protected]> | 2024-04-21 21:32:18 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-04-21 21:32:18 +0000 |
| commit | a5b006268b7a20ff4ea6ad0d9090c6a6f2bb4602 (patch) | |
| tree | a45723a6a79cc05fbaaed0b64fff26f6f007b03b | |
| parent | da86c086510490602ffdd688760fb59cc7a1e524 (diff) | |
| parent | 3f8736e87210b2c73e94b6bda47bd4e18a26d845 (diff) | |
Merge pull request #2848 from jannic/pio_pull_doc_improvement
Add a comment to the pio rx fifo pull function
| -rw-r--r-- | embassy-rp/src/pio/mod.rs | 4 |
1 files changed, 4 insertions, 0 deletions
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> { | |||
| 324 | } | 324 | } |
| 325 | 325 | ||
| 326 | /// Pull data from RX FIFO. | 326 | /// Pull data from RX FIFO. |
| 327 | /// | ||
| 328 | /// This function doesn't check if there is data available to be read. | ||
| 329 | /// If the rx FIFO is empty, an undefined value is returned. If you only | ||
| 330 | /// want to pull if data is available, use `try_pull` instead. | ||
| 327 | pub fn pull(&mut self) -> u32 { | 331 | pub fn pull(&mut self) -> u32 { |
| 328 | PIO::PIO.rxf(SM).read() | 332 | PIO::PIO.rxf(SM).read() |
| 329 | } | 333 | } |
