diff options
author | Brian Cully <bjc@kublai.com> | 2019-08-01 21:16:55 -0400 |
---|---|---|
committer | Brian Cully <bjc@kublai.com> | 2019-08-01 21:16:55 -0400 |
commit | f8c64737d196f79364f2eb64145d40adabc30aff (patch) | |
tree | c9e11a5ac02849a34a4190e07f6b6fc768a2ee00 | |
parent | c2119f219eb538fa3ebcb942e99f615a7b1be266 (diff) | |
download | samd21-demo-f8c64737d196f79364f2eb64145d40adabc30aff.tar.gz samd21-demo-f8c64737d196f79364f2eb64145d40adabc30aff.zip |
Remove debugging code.
-rw-r--r-- | usbh/src/pipe.rs | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/usbh/src/pipe.rs b/usbh/src/pipe.rs index 08602a3..537eba0 100644 --- a/usbh/src/pipe.rs +++ b/usbh/src/pipe.rs @@ -439,7 +439,6 @@ impl Pipe<'_, '_> { self.regs.statusclr.write(|w| w.pfreeze().set_bit()); } - #[cfg(not(feature = "foo"))] fn dispatch_result(&mut self, token: PToken) -> Result<bool, PipeErr> { if self.is_transfer_complete(token)? { self.regs.statusset.write(|w| w.pfreeze().set_bit()); @@ -471,62 +470,6 @@ impl Pipe<'_, '_> { } } - #[cfg(feature = "foo")] - fn dispatch_result(&mut self, token: PToken) -> Result<bool, PipeErr> { - if self.is_transfer_complete(token)? { - self.regs.statusset.write(|w| w.pfreeze().set_bit()); - Ok(true) - } else if self.regs.intflag.read().stall().bit_is_set() { - warn!("stall"); - self.log_regs(); - self.regs.intflag.write(|w| w.stall().set_bit()); - self.regs.statusset.write(|w| w.pfreeze().set_bit()); - Err(PipeErr::Stall) - } else if self.regs.intflag.read().trfail().bit_is_set() { - warn!("trfail"); - self.log_regs(); - self.regs.intflag.write(|w| w.trfail().set_bit()); - self.regs.statusset.write(|w| w.pfreeze().set_bit()); - Err(PipeErr::TransferFail) - } else if self.regs.intflag.read().perr().bit_is_set() { - warn!("perr"); - self.log_regs(); - self.regs.intflag.write(|w| w.perr().set_bit()); - self.regs.statusset.write(|w| w.pfreeze().set_bit()); - Err(PipeErr::PipeErr) - } else if self.desc.bank0.status_bk.read().errorflow().bit_is_set() { - warn!("errorflow"); - self.log_regs(); - self.desc - .bank0 - .status_bk - .write(|w| w.errorflow().clear_bit()); - self.regs.statusset.write(|w| w.pfreeze().set_bit()); - Err(PipeErr::Flow) - } else if self.desc.bank0.status_pipe.read().touter().bit_is_set() { - warn!("touter"); - self.log_regs(); - self.desc - .bank0 - .status_pipe - .write(|w| w.touter().clear_bit()); - self.regs.statusset.write(|w| w.pfreeze().set_bit()); - Err(PipeErr::HWTimeout) - } else if self.desc.bank0.status_pipe.read().dtgler().bit_is_set() { - warn!("dtgler"); - self.log_regs(); - self.desc - .bank0 - .status_pipe - .write(|w| w.dtgler().clear_bit()); - self.regs.statusset.write(|w| w.pfreeze().set_bit()); - Err(PipeErr::DataToggle) - } else { - // Nothing wrong, but not done yet. - Ok(false) - } - } - fn is_transfer_complete(&mut self, token: PToken) -> Result<bool, PipeErr> { match token { PToken::Setup => { |