From 0eb02b64013c8d0a7b5bf62ca9339315d513a38b Mon Sep 17 00:00:00 2001 From: Keyur Hariya Date: Fri, 2 Feb 2018 11:06:52 -0600 Subject: [PATCH] Remove automatic I2C stop after each read Automatic stop prevents sending repeated start. --- targets/TARGET_Maxim/TARGET_MAX32625/i2c_api.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/targets/TARGET_Maxim/TARGET_MAX32625/i2c_api.c b/targets/TARGET_Maxim/TARGET_MAX32625/i2c_api.c index 6886bee048..a068a23efe 100644 --- a/targets/TARGET_Maxim/TARGET_MAX32625/i2c_api.c +++ b/targets/TARGET_Maxim/TARGET_MAX32625/i2c_api.c @@ -101,7 +101,6 @@ int i2c_stop(i2c_t *obj) //****************************************************************************** int i2c_read(i2c_t *obj, int address, char *data, int length, int stop) { - MBED_ASSERT(stop != 0); return I2CM_Read(obj->i2c, address >> 1, NULL, 0, (uint8_t *)data, length); } @@ -147,11 +146,6 @@ int i2c_byte_read(i2c_t *obj, int last) if (I2CM_WriteTxFifo(i2cm, fifo, MXC_S_I2CM_TRANS_TAG_RXDATA_NACK) != E_NO_ERROR) { goto byte_write_err; } - - // Send the stop condition - if (I2CM_WriteTxFifo(i2cm, fifo, MXC_S_I2CM_TRANS_TAG_STOP) != E_NO_ERROR) { - goto byte_write_err; - } } else { if (I2CM_WriteTxFifo(i2cm, fifo, MXC_S_I2CM_TRANS_TAG_RXDATA_COUNT) != E_NO_ERROR) { goto byte_write_err;