/* Checks the slave response to master's start signal.  */
static status_t I2C_MasterCheckStartResponse(I2C_Type *base)
/* Checks the slave response to master's start signal.  */
static status_t I2C_MasterCheckStartResponse(I2C_Type *base)
{
    status_t result = I2C_PendingStatusWait(base);
    if (result != kStatus_Success)
    {
        return result;
    }
    if (((base->STAT & I2C_STAT_MSTSTATE_MASK) >> I2C_STAT_MSTSTATE_SHIFT) == I2C_STAT_MSTCODE_NACKADR)
    {
        (void)I2C_MasterStop(base);
        return kStatus_I2C_Addr_Nak;
    }
    return kStatus_Success;
}