Skip to content

Commit 86dbdcc

Browse files
fix restart condition in stm32l4_i2c.c for composite tx/rx
1 parent d9990b3 commit 86dbdcc

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

system/libstm32l4_dragonfly/stm32l4_i2c.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ static void stm32l4_i2c_master_transmit(stm32l4_i2c_t *i2c)
161161
}
162162
else
163163
{
164-
if (i2c->rx_data || !(i2c->xf_control & I2C_CONTROL_RESTART))
164+
if (!i2c->rx_data && !(i2c->xf_control & I2C_CONTROL_RESTART))
165165
{
166166
i2c_cr2 |= I2C_CR2_AUTOEND;
167167
}
4 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)