mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-21 06:12:32 +00:00
Currently the return value of write
is broken, it never returns the
previous frame even when present. This happens because a slice of length 64 is always passed to Frame::new from within the `abort_pending_mailbox` function, causing `Frame::new` to return None. The fix is to take a subslice of length `data_length`.
This commit is contained in:
parent
233905e18c
commit
e2d2b0f362
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,3 +5,4 @@ Cargo.lock
|
||||
third_party
|
||||
/Cargo.toml
|
||||
out/
|
||||
.zed
|
||||
|
@ -200,7 +200,7 @@ impl Registers {
|
||||
if header_reg.rtr().bit() {
|
||||
F::new_remote(id, len as usize)
|
||||
} else {
|
||||
F::new(id, &data)
|
||||
F::new(id, &data[0..(len as usize)])
|
||||
}
|
||||
} else {
|
||||
// Abort request failed because the frame was already sent (or being sent) on
|
||||
|
Loading…
Reference in New Issue
Block a user