Skip to content

Commit

Permalink
Remove redundant & commented-out debug code
Browse files Browse the repository at this point in the history
  • Loading branch information
ianrrees committed Jul 8, 2021
1 parent 1e4c163 commit f242e68
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 1 addition & 5 deletions hal/src/thumbv6m/usb/bus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -979,19 +979,14 @@ impl Inner {
bank.clear_received_setup_interrupt();
}

// self.print_epstatus(idx, "read");

bank.clear_transfer_complete();

if buf.len() != 0 {
bank.set_ready(false);
}

drop(bank);

match size {
Ok(size) => {
//dbgprint!("UsbBus::read {} bytes ok", size);
dbgprint!(
"UsbBus::read {} bytes from ep {:?} -> {:?}\n",
size,
Expand All @@ -1002,6 +997,7 @@ impl Inner {
}
Err(err) => {
dbgprint!("UsbBus::read from ep {:?} -> {:?}\n", ep, err);
drop(bank); // bank holds a reference to self.desc, which print_epstatus() needs
self.print_epstatus(ep.index(), "after read");
Err(err)
}
Expand Down
6 changes: 1 addition & 5 deletions hal/src/thumbv7em/usb/bus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -925,19 +925,14 @@ impl Inner {
bank.clear_received_setup_interrupt();
}

// self.print_epstatus(idx, "read");

bank.clear_transfer_complete();

if buf.len() != 0 {
bank.set_ready(false);
}

drop(bank);

match size {
Ok(size) => {
//dbgprint!("UsbBus::read {} bytes ok", size);
dbgprint!(
"UsbBus::read {} bytes from ep {:?} -> {:?}\n",
size,
Expand All @@ -948,6 +943,7 @@ impl Inner {
}
Err(err) => {
dbgprint!("UsbBus::read from ep {:?} -> {:?}\n", ep, err);
drop(bank); // bank holds a reference to self.desc, which print_epstatus() needs
self.print_epstatus(ep.index(), "after read");
Err(err)
}
Expand Down

0 comments on commit f242e68

Please sign in to comment.