From f8c64737d196f79364f2eb64145d40adabc30aff Mon Sep 17 00:00:00 2001
From: Brian Cully <bjc@kublai.com>
Date: Thu, 1 Aug 2019 21:16:55 -0400
Subject: Remove debugging code.

---
 usbh/src/pipe.rs | 57 --------------------------------------------------------
 1 file changed, 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 => {
-- 
cgit v1.2.3