We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f1f0dad commit 0f24a0cCopy full SHA for 0f24a0c
drivers/i2c/i2c_sam0.c
@@ -162,7 +162,7 @@ static void i2c_sam0_isr(const struct device *dev)
162
data->msg.buffer++;
163
data->msg.size--;
164
} else if (status & SERCOM_I2CM_INTFLAG_SB) {
165
- if (!continue_next) {
+ if (!continue_next && (data->msg.size == 1)) {
166
/*
167
* If this is the last byte, then prepare for an auto
168
* NACK before doing the actual read. This does not
@@ -175,7 +175,7 @@ static void i2c_sam0_isr(const struct device *dev)
175
176
177
178
+ if (!continue_next && !data->msg.size) {
179
i2c->INTENCLR.reg = SERCOM_I2CM_INTENCLR_MASK;
180
k_sem_give(&data->sem);
181
return;
0 commit comments