LPC55S69: Fix the I2C SDK driver

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
pull/9910/head
Mahesh Mahadevan 2019-02-19 14:00:22 -06:00
parent 3d82af0afe
commit 66eb3deca8
1 changed files with 13 additions and 0 deletions

View File

@ -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;
}