/* param base I2C peripheral base pointer param address 7-bit slave device address. param direction Master transfer directions(transmit/receive). retval kStatus_Success Successfully send the start signal. retval kStatus_I2C_Busy Current bus is busy.  */
status_t I2C_MasterStart(I2C_Type *base, uint8_t address, i2c_direction_t direction)
/* param base I2C peripheral base pointer param address 7-bit slave device address. param direction Master transfer directions(transmit/receive). retval kStatus_Success Successfully send the start signal. retval kStatus_I2C_Busy Current bus is busy.  */
status_t I2C_MasterStart(I2C_Type *base, uint8_t address, i2c_direction_t direction)
{
    status_t result;
    result = I2C_PendingStatusWait(base);
    if (result != kStatus_Success)
    {
        return result;
    }
    base->MSTDAT = ((uint32_t)address << 1) | ((uint32_t)direction & 1U);
    base->MSTCTL = I2C_MSTCTL_MSTSTART_MASK;
    return kStatus_Success;
}