/* brief Gets the slave transfer status during a non-blocking transfer. param base The LPI2C peripheral base address. param handle Pointer to i2c_slave_handle_t structure. param count Pointer to a value to hold the number of bytes transferred. May be NULL if the count is not required. retval #kStatus_Success retval #kStatus_NoTransferInProgress  */
status_t LPI2C_SlaveTransferGetCount(LPI2C_Type *base, lpi2c_slave_handle_t *handle, size_t *count)
/* brief Gets the slave transfer status during a non-blocking transfer. param base The LPI2C peripheral base address. param handle Pointer to i2c_slave_handle_t structure. param count Pointer to a value to hold the number of bytes transferred. May be NULL if the count is not required. retval #kStatus_Success retval #kStatus_NoTransferInProgress  */
status_t LPI2C_SlaveTransferGetCount(LPI2C_Type *base, lpi2c_slave_handle_t *handle, size_t *count)
{
    assert(NULL != handle);
    if (count == NULL)
    {
        return kStatus_InvalidArgument;
    }
    if (!handle->isBusy)
    {
        *count = 0;
        return kStatus_NoTransferInProgress;
    }
    *count = handle->transferredCount;
    return kStatus_Success;
}