From 0f0467026b46a76174d4311148695a57e7f43cf3 Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Tue, 24 Sep 2019 11:00:37 -0400 Subject: Use endpoint's max packet size in transfers. --- src/pipe.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pipe.rs b/src/pipe.rs index 84e4435..60b2056 100644 --- a/src/pipe.rs +++ b/src/pipe.rs @@ -244,8 +244,7 @@ impl Pipe<'_, '_> { nak_limit: usize, millis: &dyn Fn() -> usize, ) -> Result { - // TODO: pull this from pipe descriptor for this addr/ep. - let packet_size = 8; + let packet_size = ep.max_packet_size() as isize; trace!("p{}: Should IN for {}b.", self.num, buf.len()); self.desc.bank0.pcksize.modify(|_, w| { -- cgit v1.2.3