aboutsummaryrefslogtreecommitdiffstats
path: root/usbh
diff options
context:
space:
mode:
Diffstat (limited to 'usbh')
-rw-r--r--usbh/src/pipe.rs57
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 => {