Skip to content

Commit 359d3e4

Browse files
bors[bot]Lotte Steenbrink
andauthored
Merge #307
307: recv_timeout(): document that received data is written to `packet` on return r=jonas-schievink a=Lotterleben I noticed that this info is documented for `ieee802154::recv()` but not for `recv_timeout`. This PR fixes that :) Co-authored-by: Lotte Steenbrink <[email protected]>
2 parents 04e3fcb + 3dd63e6 commit 359d3e4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

nrf-hal-common/src/ieee802154.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,11 +324,13 @@ impl<'c> Radio<'c> {
324324
}
325325

326326
/// Listens for a packet for no longer than the specified amount of microseconds
327+
/// and copies its contents into the given `packet` buffer
327328
///
328329
/// If no packet is received within the specified time then the `Timeout` error is returned
329330
///
330331
/// If a packet is received within the time span then the packet CRC is checked. If the CRC is
331332
/// incorrect then the `Crc` error is returned; otherwise the `Ok` variant is returned.
333+
/// Note that `packet` will contain the packet in any case, even if the CRC check failed.
332334
///
333335
/// Note that the time it takes to switch the radio to RX mode is included in the timeout count.
334336
/// This transition may take up to a hundred of microseconds; see the section 6.20.15.8 in the

0 commit comments

Comments
 (0)