/* param base I2C base pointer. param handle pointer to i2c_slave_handle_t structure. param count Number of bytes transferred so far by the non-blocking transaction. retval kStatus_InvalidArgument count is Invalid. retval kStatus_Success Successfully return the count.  */
status_t I2C_SlaveTransferGetCount(I2C_Type *base, i2c_slave_handle_t *handle, size_t *count)
/* param base I2C base pointer. param handle pointer to i2c_slave_handle_t structure. param count Number of bytes transferred so far by the non-blocking transaction. retval kStatus_InvalidArgument count is Invalid. retval kStatus_Success Successfully return the count.  */
status_t I2C_SlaveTransferGetCount(I2C_Type *base, i2c_slave_handle_t *handle, size_t *count)
{
    assert(handle != NULL);
    if (NULL == count)
    {
        return kStatus_InvalidArgument;
    }
    if (!handle->isBusy)
    {
        *count = 0;
        return kStatus_NoTransferInProgress;
    }
    *count = handle->transfer.transferredCount;
    return kStatus_Success;
}