Skip to content

Commit b630691

Browse files
author
Cruz Monrreal
authored
Merge pull request #6606 from maximmbed/max32630-fix-i2c
Fix I2C master
2 parents 988a16b + e802b25 commit b630691

File tree

1 file changed

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

1 file changed

+0
-6
lines changed

targets/TARGET_Maxim/TARGET_MAX32630/i2c_api.c

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

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

0 commit comments

Comments
 (0)