Skip to content
  • Adam Wujek's avatar
    common/i2c: fix variable size block writes · 5fd1cff2
    Adam Wujek authored
    
    
    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: default avatarAdam Wujek <dev_public@wujek.eu>
    5fd1cff2