Content originally posted in LPCWare by fjrg76 on Tue Dec 23 19:32:18 MST 2014
Quote: 1234567890
Indeed you only have to write the fields with changed values.
But this is a allways-safe function. And usually you change [u]all[/u] values during runtime of a program (address, sizes, sometimes buffers as well) and this avoids using an outdated wrong value.
That's right!! I found that when using only and only one I2C device it's enough to fill the struct once. However, a typical system has more than one I2C device on-board; so one needs to update the struct fields whenever communicating with any other device.
Thank you!