Skip to content

Commit 39456d2

Browse files
committed
i2c: Set ack bit on multibyte reads
Enable the ack bit on multibyte (>2) reads otherwise bytes from the remote device are not acknowledged. Signed-off-by: Sjoerd Simons <sjoerd@luon.net>
1 parent c36e619 commit 39456d2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/i2c.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,7 @@ where
533533
self.nb.i2c.cr1.modify(|_, w| w.ack().set_bit());
534534
}
535535
buffer_len => {
536+
self.nb.i2c.cr1.modify(|_, w| w.ack().set_bit());
536537
self.nb.i2c.sr1.read();
537538
self.nb.i2c.sr2.read();
538539

0 commit comments

Comments
 (0)