/* Returns the specified ETHERNET DMA Rx Desc buffer size.  */
uint32_t ETH_GetDmaRxDescBufSize(ETH_DMADescType *DMARxDesc, uint32_t DMARxDesc_Buffer)
/* Returns the specified ETHERNET DMA Rx Desc buffer size.  */
uint32_t ETH_GetDmaRxDescBufSize(ETH_DMADescType *DMARxDesc, uint32_t DMARxDesc_Buffer)
{
    assert_param(IS_ETH_DMA_RXDESC_BUFFER(DMARxDesc_Buffer));
    if (DMARxDesc_Buffer != ETH_DMA_RX_DESC_BUFFER1)
    {
        return ((DMARxDesc->CtrlOrBufSize & ETH_DMA_RX_DESC_RBS2) >> ETH_DMA_RX_DESC_BUF2_SIZE_SHIFT);
    }
    else
    {
        return (DMARxDesc->CtrlOrBufSize & ETH_DMA_RX_DESC_RBS1);
    }
}