Skip to content
Snippets Groups Projects
Commit 0b2ffc21 authored by Johann Fischer's avatar Johann Fischer
Browse files

Merge pull request #5075 from jfischer-phytec-iot/pr@kinetis-i2c

cpu/kinetis_common/periph/i2c.c: fix generating the STOP signal
parents 93bce629 db250682
No related branches found
No related tags found
No related merge requests found
......@@ -261,6 +261,12 @@ static inline int _i2c_receive(I2C_Type *dev, uint8_t *data, int length)
dev->C1 |= I2C_C1_TXAK_MASK;
}
if (length == 0) {
/* Stop immediately because the receiving of the next byte will be
* initiated by reading the data register (dev->D). */
dev->C1 &= ~I2C_C1_MST_MASK;
}
data[n] = (char)dev->D;
n++;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment