mirror of https://github.com/ARMmbed/mbed-os.git
LPC55S69: Fix the I2C SDK driver
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>pull/9910/head
parent
3d82af0afe
commit
66eb3deca8
|
@ -250,6 +250,12 @@ status_t I2C_MasterStart(I2C_Type *base, uint8_t address, i2c_direction_t direct
|
|||
/* Start the transfer */
|
||||
base->MSTCTL = I2C_MSTCTL_MSTSTART_MASK;
|
||||
|
||||
result = I2C_PendingStatusWait(base);
|
||||
if (result == kStatus_I2C_Timeout)
|
||||
{
|
||||
return kStatus_I2C_Timeout;
|
||||
}
|
||||
|
||||
return kStatus_Success;
|
||||
}
|
||||
|
||||
|
@ -269,6 +275,13 @@ status_t I2C_MasterStop(I2C_Type *base)
|
|||
}
|
||||
|
||||
base->MSTCTL = I2C_MSTCTL_MSTSTOP_MASK;
|
||||
|
||||
result = I2C_PendingStatusWait(base);
|
||||
if (result == kStatus_I2C_Timeout)
|
||||
{
|
||||
return kStatus_I2C_Timeout;
|
||||
}
|
||||
|
||||
return kStatus_Success;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue