diff options
author | Brian Cully <bjc@kublai.com> | 2019-09-24 11:00:37 -0400 |
---|---|---|
committer | Brian Cully <bjc@kublai.com> | 2019-09-24 11:00:37 -0400 |
commit | 0f0467026b46a76174d4311148695a57e7f43cf3 (patch) | |
tree | d5cd9f95780cf14ae7163abaf91619c53d503ccf | |
parent | ba1cd9f1b3cd3343dff4663ad1e717e345971827 (diff) | |
download | atsamd-usb-host-0f0467026b46a76174d4311148695a57e7f43cf3.tar.gz atsamd-usb-host-0f0467026b46a76174d4311148695a57e7f43cf3.zip |
Use endpoint's max packet size in transfers.
-rw-r--r-- | src/pipe.rs | 3 |
1 files changed, 1 insertions, 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<usize, PipeErr> { - // 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| { |