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 <manivannan.sadhasivam@linaro.org>
This commit is contained in:
parent
0a3d9933c2
commit
2b0821cce7
1 changed files with 1 additions and 1 deletions
|
@ -455,7 +455,7 @@ s32_t stm32_i2c_msg_read(struct device *dev, struct i2c_msg *msg,
|
|||
|
||||
for (u32_t counter = 2; counter > 0; counter--) {
|
||||
len--;
|
||||
*data->current.buf = LL_I2C_ReceiveData8(i2c);
|
||||
*buf = LL_I2C_ReceiveData8(i2c);
|
||||
buf++;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue