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:
Baohong Liu 2016-05-25 17:07:20 -07:00 committed by Anas Nashif
commit 14d3d37843

View file

@ -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);
} }