Skip to content

Commit e6d901a

Browse files
Keyur HariyaKeyur Hariya
authored andcommitted
Remove automatic I2C stop after each read
Automatic stop prevents sending repeated start.
1 parent dcf3b90 commit e6d901a

File tree

1 file changed

+0
-6
lines changed
  • targets/TARGET_Maxim/TARGET_MAX32625

1 file changed

+0
-6
lines changed

targets/TARGET_Maxim/TARGET_MAX32625/i2c_api.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ int i2c_stop(i2c_t *obj)
101101
//******************************************************************************
102102
int i2c_read(i2c_t *obj, int address, char *data, int length, int stop)
103103
{
104-
MBED_ASSERT(stop != 0);
105104
return I2CM_Read(obj->i2c, address >> 1, NULL, 0, (uint8_t *)data, length);
106105
}
107106

@@ -147,11 +146,6 @@ int i2c_byte_read(i2c_t *obj, int last)
147146
if (I2CM_WriteTxFifo(i2cm, fifo, MXC_S_I2CM_TRANS_TAG_RXDATA_NACK) != E_NO_ERROR) {
148147
goto byte_write_err;
149148
}
150-
151-
// Send the stop condition
152-
if (I2CM_WriteTxFifo(i2cm, fifo, MXC_S_I2CM_TRANS_TAG_STOP) != E_NO_ERROR) {
153-
goto byte_write_err;
154-
}
155149
} else {
156150
if (I2CM_WriteTxFifo(i2cm, fifo, MXC_S_I2CM_TRANS_TAG_RXDATA_COUNT) != E_NO_ERROR) {
157151
goto byte_write_err;

0 commit comments

Comments
 (0)