Skip to content

Commit 66eb3de

Browse files
committed
LPC55S69: Fix the I2C SDK driver
Signed-off-by: Mahesh Mahadevan <[email protected]>
1 parent 3d82af0 commit 66eb3de

File tree

1 file changed

+13
-0
lines changed
  • targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC55S69/drivers

1 file changed

+13
-0
lines changed

targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC55S69/drivers/fsl_i2c.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,12 @@ status_t I2C_MasterStart(I2C_Type *base, uint8_t address, i2c_direction_t direct
250250
/* Start the transfer */
251251
base->MSTCTL = I2C_MSTCTL_MSTSTART_MASK;
252252

253+
result = I2C_PendingStatusWait(base);
254+
if (result == kStatus_I2C_Timeout)
255+
{
256+
return kStatus_I2C_Timeout;
257+
}
258+
253259
return kStatus_Success;
254260
}
255261

@@ -269,6 +275,13 @@ status_t I2C_MasterStop(I2C_Type *base)
269275
}
270276

271277
base->MSTCTL = I2C_MSTCTL_MSTSTOP_MASK;
278+
279+
result = I2C_PendingStatusWait(base);
280+
if (result == kStatus_I2C_Timeout)
281+
{
282+
return kStatus_I2C_Timeout;
283+
}
284+
272285
return kStatus_Success;
273286
}
274287

0 commit comments

Comments
 (0)