server udc fix
This commit is contained in:
parent
a8d843fd2d
commit
7ba368bf22
@ -97,10 +97,13 @@ impl UsbGadget {
|
||||
/* 4 – re‑attach + pull‑up */
|
||||
info!("🔌 re‑attaching gadget to {ctrl}");
|
||||
Self::write_attr(self.udc_file, &ctrl)?;
|
||||
info!("Wrote udc file");
|
||||
let sc = format!("/sys/class/udc/{ctrl}/soft_connect");
|
||||
Self::write_attr(&sc, "0")?;
|
||||
info!("Wrote soft connect file 0");
|
||||
thread::sleep(Duration::from_millis(50));
|
||||
Self::write_attr(&sc, "1")?;
|
||||
info!("Wrote soft connect file 1");
|
||||
|
||||
/* 5 – wait for host (but tolerate sleep) */
|
||||
Self::wait_state(&ctrl, "configured", 6_000)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user