Skip to content

Commit b8a9d11

Browse files
committed
STUSB4500: request sink PDO with current
Set sink PDO operating current to maximum operating current of supply PDO.
1 parent e21e3a4 commit b8a9d11

File tree

1 file changed

+5
-1
lines changed
  • openemc-firmware/src/supply/stusb4500

1 file changed

+5
-1
lines changed

openemc-firmware/src/supply/stusb4500/mod.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,11 @@ where
365365
Some(pdo) => {
366366
defmt::info!("Matched best USB supply PDO: {:?}", &pdo);
367367

368-
let new_sink_pdo = SinkPdo::Fixed(FixedSinkPdo { voltage: pdo.voltage, ..Default::default() });
368+
let new_sink_pdo = SinkPdo::Fixed(FixedSinkPdo {
369+
voltage: pdo.voltage,
370+
operating_current: pdo.max_operating_current,
371+
..Default::default()
372+
});
369373
let reset_req = self.sink_pdos[1] != new_sink_pdo || self.active_sink_pdos != 2;
370374

371375
defmt::debug!("Setting and activating sink PDO 2: {:?}", &new_sink_pdo);

0 commit comments

Comments
 (0)