Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions drivers/i2c/i2c_sam0.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ static void i2c_sam0_isr(const struct device *dev)
data->msg.buffer++;
data->msg.size--;
} else if (status & SERCOM_I2CM_INTFLAG_SB) {
if (!continue_next) {
if (!continue_next && (data->msg.size == 1)) {
/*
* If this is the last byte, then prepare for an auto
* NACK before doing the actual read. This does not
Expand All @@ -175,7 +175,7 @@ static void i2c_sam0_isr(const struct device *dev)
data->msg.buffer++;
data->msg.size--;

if (!continue_next) {
if (!continue_next && !data->msg.size) {
i2c->INTENCLR.reg = SERCOM_I2CM_INTENCLR_MASK;
k_sem_give(&data->sem);
return;
Expand Down