Skip to content

Commit

Permalink
I must not have been thinking straight when comitting that last one
Browse files Browse the repository at this point in the history
  • Loading branch information
ohunter committed May 7, 2024
1 parent 65feddc commit 57bd54c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/linux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ impl<'a> I2CTransfer<'a> for LinuxI2CDevice {
/// Issue the provided sequence of I2C transactions
fn transfer(&mut self, messages: &'a mut [Self::Message]) -> Result<u32, LinuxI2CError> {
let msg_type = |flag: u16| flag & I2CMessageFlags::READ.bits();
let mut prev_msg_type = messages.first().map(|m| msg_type(m.flags));
let mut prev_msg_type = None;
for msg in messages.iter_mut() {
msg.addr = self.slave_address;

Expand Down

0 comments on commit 57bd54c

Please sign in to comment.