/* param base Pointer to FLEXIO_UART_Type param handle Pointer to flexio_uart_edma_handle_t structure param count Number of bytes received so far by the non-blocking transaction. retval kStatus_NoTransferInProgress transfer has finished or no transfer in progress. retval kStatus_Success Successfully return the count.  */
status_t FLEXIO_UART_TransferGetReceiveCountEDMA(FLEXIO_UART_Type *base, flexio_uart_edma_handle_t *handle, size_t *count)
/* param base Pointer to FLEXIO_UART_Type param handle Pointer to flexio_uart_edma_handle_t structure param count Number of bytes received so far by the non-blocking transaction. retval kStatus_NoTransferInProgress transfer has finished or no transfer in progress. retval kStatus_Success Successfully return the count.  */
status_t FLEXIO_UART_TransferGetReceiveCountEDMA(FLEXIO_UART_Type *base, flexio_uart_edma_handle_t *handle, size_t *count)
{
    assert(handle);
    assert(handle->rxEdmaHandle);
    assert(count);
    if (kFLEXIO_UART_RxIdle == handle->rxState)
    {
        return kStatus_NoTransferInProgress;
    }
    *count = handle->rxDataSizeAll -
             (uint32_t)handle->nbytes *
                 EDMA_GetRemainingMajorLoopCount(handle->rxEdmaHandle->base, handle->rxEdmaHandle->channel);
    return kStatus_Success;
}