/* param base The LPI2C peripheral base address. param handle Pointer to the LPI2C slave driver handle. param callback User provided pointer to the asynchronous callback function. param userData User provided pointer to the application callback data.  */
void LPI2C_SlaveTransferCreateHandle(LPI2C_Type *base, lpi2c_slave_handle_t *handle, lpi2c_slave_transfer_callback_t callback, void *userData)
/* param base The LPI2C peripheral base address. param handle Pointer to the LPI2C slave driver handle. param callback User provided pointer to the asynchronous callback function. param userData User provided pointer to the application callback data.  */
void LPI2C_SlaveTransferCreateHandle(LPI2C_Type *base, lpi2c_slave_handle_t *handle, lpi2c_slave_transfer_callback_t callback, void *userData)
{
    uint32_t instance;
    assert(NULL != handle);
    (void)memset(handle, 0, sizeof(*handle));
    instance = LPI2C_GetInstance(base);
    handle->callback = callback;
    handle->userData = userData;
    s_lpi2cSlaveHandle[instance] = handle;
    s_lpi2cSlaveIsr = LPI2C_SlaveTransferHandleIRQ;
    LPI2C_SlaveDisableInterrupts(base, (uint32_t)kSlaveIrqFlags);
    (void)EnableIRQ(kLpi2cIrqs[instance]);
    base->STAR = LPI2C_STAR_TXNACK_MASK;
}