/* brief Aborts the slave non-blocking transfers. note This API could be called at any time to stop slave for handling the bus events. param base The LPI2C peripheral base address. param handle Pointer to #lpi2c_slave_handle_t structure which stores the transfer state. retval #kStatus_Success retval #kStatus_LPI2C_Idle  */
void LPI2C_SlaveTransferAbort(LPI2C_Type *base, lpi2c_slave_handle_t *handle)
/* brief Aborts the slave non-blocking transfers. note This API could be called at any time to stop slave for handling the bus events. param base The LPI2C peripheral base address. param handle Pointer to #lpi2c_slave_handle_t structure which stores the transfer state. retval #kStatus_Success retval #kStatus_LPI2C_Idle  */
void LPI2C_SlaveTransferAbort(LPI2C_Type *base, lpi2c_slave_handle_t *handle)
{
    assert(NULL != handle);
    if (handle->isBusy)
    {
        LPI2C_SlaveDisableInterrupts(base, (uint32_t)kSlaveIrqFlags);
        base->STAR = LPI2C_STAR_TXNACK_MASK;
        (void)memset(&handle->transfer, 0, sizeof(handle->transfer));
        handle->isBusy = false;
    }
}