We use cookies to provide our visitors with an optimal site experience. View our privacy notice and cookie notice to learn more about how we use cookies and how to manage your settings. By proceeding on our website you consent to the use of cookies.
I am trying to write EEPROM through the call i2c_write in board_detect.c. Data are partially written. But it is shifted 2 bytes ( i.e. data are placed into address + 2 ) as shown :
another problem is that first 16 byte data is not written.
I didn’t call i2c_init, etc. Assumed that i2c is initialized. Do you have any suggestions that may have caused these problems?
At first, I check i2c_write (… alen, ), it was not used inside the function i2c_write itself, but I believe it is passed into I2C_ADAP->write().
The data shifted by 2 bytes, it is the data struct is null terminated for string. So added 2 bytes. Cannot directly passing eeprom data struct pointer for writing.
Tricky stuff.