diff --git a/fusb302b/src/lib.rs b/fusb302b/src/lib.rs index 73a7aec..4f8100a 100644 --- a/fusb302b/src/lib.rs +++ b/fusb302b/src/lib.rs @@ -127,7 +127,7 @@ impl<I2C: I2c> SinkDriver for Fusb302b<I2C> { .await; self.registers - .set_control0(Control0::default().with_int_mask(false).with_host_cur(01)) + .set_control0(Control0::default().with_int_mask(false).with_host_cur(0b01)) .await; self.registers .set_control3( @@ -288,7 +288,6 @@ impl<I2C: I2c> Fusb302b<I2C> { panic!(); }; - let _ = self.registers.status0(); if self.registers.status0().await.bc_lvl() == 0 { // No CC activity *cc_pin = !*cc_pin; diff --git a/usb-pd/src/messages/mod.rs b/usb-pd/src/messages/mod.rs index 6726ff0..53e738c 100644 --- a/usb-pd/src/messages/mod.rs +++ b/usb-pd/src/messages/mod.rs @@ -81,7 +81,7 @@ impl Message { let data = payload[4..] .chunks_exact(4) .take(7) - .map(|buf| LittleEndian::read_u32(buf)) + .map(LittleEndian::read_u32) .collect::<Vec<u32, 7>>(); trace!("VDM RX: {:?} {:?}", header, data);