/* param base I2C base pointer. param handle pointer to i2c_master_handle_t structure which stores the transfer state. 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_MasterTransferGetCount(I2C_Type *base, i2c_master_handle_t *handle, size_t *count)
/* param base I2C base pointer. param handle pointer to i2c_master_handle_t structure which stores the transfer state. 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_MasterTransferGetCount(I2C_Type *base, i2c_master_handle_t *handle, size_t *count)
{
    assert(NULL != handle);
    if (NULL == count)
    {
        return kStatus_InvalidArgument;
    }
    *count = handle->transferSize - handle->transfer.dataSize;
    return kStatus_Success;
}