Skip to content

Commit 2b0821c

Browse files
Mani-Sadhasivamgalak
authored andcommitted
drivers: i2c: stm32f4: Fix incorrect buffer assignment
Wrong buffer assigned for receiving the last 2 bytes in multi byte reception of STM32F4 i2c driver. Change the buffer to correct one. Signed-off-by: Manivannan Sadhasivam <[email protected]>
1 parent 0a3d993 commit 2b0821c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/i2c/i2c_ll_stm32_v1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ s32_t stm32_i2c_msg_read(struct device *dev, struct i2c_msg *msg,
455455

456456
for (u32_t counter = 2; counter > 0; counter--) {
457457
len--;
458-
*data->current.buf = LL_I2C_ReceiveData8(i2c);
458+
*buf = LL_I2C_ReceiveData8(i2c);
459459
buf++;
460460
}
461461

0 commit comments

Comments
 (0)