Skip to content
Commit 1f0b1403 authored by Frank Terbeck's avatar Frank Terbeck Committed by Carles Cufí
Browse files

stm32,i2c: Fix large I2C transactions



The stm32's I2C peripheral has a maximum transmission size. Larger trans-
action, that I2C itself allows, can be achieved be using the peripheral's
reload-mode.

In order to do that, st's low-lever drivers need to be informed according-
ly. The previous iteration of the code mishandled the next_msg_flags para-
meter, causing the issue to manifest itself.

This refactors the inner loop of i2c_stm32_transfer() into its own func-
tion. This passes the message parameter by value in order to be able to
mutate its state while keeping the original datum from the user intact
during the entire procedure.

Fixes #43235

Signed-off-by: default avatarFrank Terbeck <ft@bewatermyfriend.org>
parent ad959bc2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment