/* 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 I2C peripheral base address. param handle Pointer to i2c_slave_handle_t structure which stores the transfer state. retval kStatus_Success retval #kStatus_I2C_Idle  */
void I2C_SlaveTransferAbort(I2C_Type *base, i2c_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 I2C peripheral base address. param handle Pointer to i2c_slave_handle_t structure which stores the transfer state. retval kStatus_Success retval #kStatus_I2C_Idle  */
void I2C_SlaveTransferAbort(I2C_Type *base, i2c_slave_handle_t *handle)
{
    I2C_DisableInterrupts(base, (uint32_t)kI2C_SlaveIrqFlags);
    I2C_SlaveEnable(base, false);
    handle->isBusy          = false;
    handle->transfer.txSize = 0U;
    handle->transfer.rxSize = 0U;
}