diff options
author | Brian Cully <bjc@kublai.com> | 2019-07-28 18:02:03 -0400 |
---|---|---|
committer | Brian Cully <bjc@kublai.com> | 2019-07-28 18:02:03 -0400 |
commit | 7851fa4ed3ff4b0c494d89ed6501e5998b1cc932 (patch) | |
tree | 17c4f11463c3d05f6ccb58dace28db5a8f318bab /usbh | |
parent | 1b055ef6621812b6be30b4230b1cc8304d105150 (diff) | |
download | samd21-demo-7851fa4ed3ff4b0c494d89ed6501e5998b1cc932.tar.gz samd21-demo-7851fa4ed3ff4b0c494d89ed6501e5998b1cc932.zip |
More short packet notes.
Diffstat (limited to 'usbh')
-rw-r--r-- | usbh/src/pipe.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usbh/src/pipe.rs b/usbh/src/pipe.rs index d431e06..c33a3a2 100644 --- a/usbh/src/pipe.rs +++ b/usbh/src/pipe.rs @@ -249,7 +249,9 @@ impl Pipe<'_, '_> { // TODO: honestly, this is probably a panic condition, // since whatever's in DataBuf.ptr is totally // invalid. Alternately, this function should be declared - // `unsafe`. + // `unsafe`. OR! Make the function take a mutable slice of + // u8, and leave it up to the caller to figure out how to + // deal with short packets. Err(PipeErr::ShortPacket) } else { Ok(bytes_received) |