From 7851fa4ed3ff4b0c494d89ed6501e5998b1cc932 Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Sun, 28 Jul 2019 18:02:03 -0400 Subject: More short packet notes. --- usbh/src/pipe.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'usbh') 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) -- cgit v1.2.3