samples: I2c FRAM app bug fix
I2C_MSG_RESTART is not used in QMSI driver. What is really needed here is I2C_MSG_STOP; Missing this flag is causing the issue. JIRA: ZEP-398 Change-Id: I8fbfe15890c886ede4cce3d2cc68f53758a41e75 Signed-off-by: Baohong Liu <baohong.liu@intel.com>
This commit is contained in:
parent
528b04f520
commit
14d3d37843
1 changed files with 1 additions and 1 deletions
|
@ -76,7 +76,7 @@ int read_bytes(struct device *i2c_dev, uint16_t addr,
|
||||||
/* Read from device. RESTART as neededm and STOP after this. */
|
/* Read from device. RESTART as neededm and STOP after this. */
|
||||||
msgs[1].buf = data;
|
msgs[1].buf = data;
|
||||||
msgs[1].len = num_bytes;
|
msgs[1].len = num_bytes;
|
||||||
msgs[1].flags = I2C_MSG_READ | I2C_MSG_RESTART;
|
msgs[1].flags = I2C_MSG_READ | I2C_MSG_STOP;
|
||||||
|
|
||||||
return i2c_transfer(i2c_dev, &msgs[0], 2, FRAM_I2C_ADDR);
|
return i2c_transfer(i2c_dev, &msgs[0], 2, FRAM_I2C_ADDR);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue