/* brief Reusable routine to handle master interrupts. note This function does not need to be called unless you are reimplementing the nonblocking API's interrupt handler routines to add special functionality. param base The I2C peripheral base address. param handle Pointer to the I2C master driver handle.  */
void I2C_MasterTransferHandleIRQ(I2C_Type *base, i2c_master_handle_t *handle)
/* brief Reusable routine to handle master interrupts. note This function does not need to be called unless you are reimplementing the nonblocking API's interrupt handler routines to add special functionality. param base The I2C peripheral base address. param handle Pointer to the I2C master driver handle.  */
void I2C_MasterTransferHandleIRQ(I2C_Type *base, i2c_master_handle_t *handle)
{
    bool isDone;
    status_t result;
    if (NULL == handle)
    {
        return;
    }
    result = I2C_RunTransferStateMachine(base, handle, &isDone);
    if ((result != kStatus_Success) || isDone)
    {
        handle->state = (uint8_t)kIdleState;
        I2C_DisableInterrupts(base, (uint32_t)kI2C_MasterIrqFlags);
        if (handle->completionCallback != NULL)
        {
            handle->completionCallback(base, handle, result, handle->userData);
        }
    }
}