Skip to content

Commit

Permalink
quiet down debug; add a method to expatriate PORTSC
Browse files Browse the repository at this point in the history
  • Loading branch information
bunnie committed Nov 20, 2024
1 parent ed085f2 commit 996b574
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libs/cramium-hal/src/usb/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1553,6 +1553,8 @@ impl CorigineUsb {

pub fn pp(&self) -> bool { self.csr.rf(PORTSC_PP) != 0 }

pub fn portsc_val(&self) -> u32 { self.csr.r(PORTSC) }

pub fn stop(&mut self) {
self.csr.rmwf(USBCMD_INT_ENABLE, 0);
self.csr.rmwf(USBCMD_RUN_STOP, 0);
Expand Down Expand Up @@ -2040,6 +2042,7 @@ impl CorigineUsb {
unsafe { udc_ep.enq_pt.load(Ordering::SeqCst).as_mut().expect("couldn't deref pointer") };
let mut pcs = udc_ep.pcs;

/*
crate::println!(
"PEI = {} bufaddr = 0x{:x} pcs = {} length = 0x{:x}, enq_pt = 0x{:x?}",
pei,
Expand All @@ -2048,6 +2051,7 @@ impl CorigineUsb {
len,
enq_pt,
);
*/
for i in 0..num_trb {
if num_trb == 1 {
//only 1 trb
Expand Down

0 comments on commit 996b574

Please sign in to comment.