Skip to content

Commit

Permalink
Fix binary literal, unused status read, and redundant closure
Browse files Browse the repository at this point in the history
  • Loading branch information
fmckeogh committed May 20, 2024
1 parent daa333b commit c8d8a79
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions fusb302b/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion usb-pd/src/messages/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c8d8a79

Please sign in to comment.