/* param base The I2C peripheral base address. param handle Pointer to the I2C slave driver handle. param callback User provided pointer to the asynchronous callback function. param userData User provided pointer to the application callback data.  */
void I2C_SlaveTransferCreateHandle(I2C_Type *base, i2c_slave_handle_t *handle, i2c_slave_transfer_callback_t callback, void *userData)
/* param base The I2C peripheral base address. param handle Pointer to the I2C slave driver handle. param callback User provided pointer to the asynchronous callback function. param userData User provided pointer to the application callback data.  */
void I2C_SlaveTransferCreateHandle(I2C_Type *base, i2c_slave_handle_t *handle, i2c_slave_transfer_callback_t callback, void *userData)
{
    assert(handle != NULL);
    uint32_t instance;
    i2c_to_flexcomm_t handler;
    handler.i2c_slave_handler = I2C_SlaveTransferHandleIRQ;
    (void)memset(handle, 0, sizeof(*handle));
    instance = I2C_GetInstance(base);
    handle->callback = callback;
    handle->userData = userData;
    handle->slaveFsm = kI2C_SlaveFsmAddressMatch;
    handle->transfer.handle = handle;
    FLEXCOMM_SetIRQHandler(base, handler.flexcomm_handler, handle);
    I2C_DisableInterrupts(base, (uint32_t)kI2C_SlaveIrqFlags);
    (void)EnableIRQ(s_i2cIRQ[instance]);
}