/* param base USART peripheral base address. param handle USART handle pointer. param count Send bytes count. retval kStatus_NoTransferInProgress No send in progress. retval kStatus_InvalidArgument Parameter is invalid. retval kStatus_Success Get successfully through the parameter  */
status_t USART_TransferGetSendCount(USART_Type *base, usart_handle_t *handle, uint32_t *count)
/* param base USART peripheral base address. param handle USART handle pointer. param count Send bytes count. retval kStatus_NoTransferInProgress No send in progress. retval kStatus_InvalidArgument Parameter is invalid. retval kStatus_Success Get successfully through the parameter  */
status_t USART_TransferGetSendCount(USART_Type *base, usart_handle_t *handle, uint32_t *count)
{
    assert(NULL != handle);
    assert(NULL != count);
    if ((uint8_t)kUSART_TxIdle == handle->txState)
    {
        return kStatus_NoTransferInProgress;
    }
    *count = handle->txDataSizeAll - handle->txDataSize -
             ((base->FIFOSTAT & USART_FIFOSTAT_TXLVL_MASK) >> USART_FIFOSTAT_TXLVL_SHIFT);
    return kStatus_Success;
}