/* param base Pointer to the FLEXIO_SPI_Type structure. param handle Pointer to the flexio_spi_master_handle_t structure to store 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 FLEXIO_SPI_MasterTransferGetCount(FLEXIO_SPI_Type *base, flexio_spi_master_handle_t *handle, size_t *count)
/* param base Pointer to the FLEXIO_SPI_Type structure. param handle Pointer to the flexio_spi_master_handle_t structure to store 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 FLEXIO_SPI_MasterTransferGetCount(FLEXIO_SPI_Type *base, flexio_spi_master_handle_t *handle, size_t *count)
{
    assert(handle);
    if (!count)
    {
        return kStatus_InvalidArgument;
    }
    if (handle->rxData)
    {
        *count = handle->transferSize - handle->rxRemainingBytes;
    }
    else
    {
        *count = handle->transferSize - handle->txRemainingBytes;
    }
    return kStatus_Success;
}