common/i2c: fix variable size block writes
The line:
*cmds->cmds[cmd_index].data_len = tx_tmp;
triggered the write to memory, which is declared as read-only (const).
Such writes trigger the memory exception.
To make the code simpler and avoid problematic write,
support only writes that has a size of a register.
The fix was tested for PEC.
Signed-off-by: Adam Wujek <dev_public@wujek.eu>
Showing
Please
register
or
sign in
to comment