/* Returns the ETH DMA Rx Desc buffer size.  */
uint32_t ETH_ReadDMARxDescBufferSize(ETH_DMADescConfig_T *DMARxDesc, ETH_DMARXDESC_BUFFER_T buffer)
/* Returns the ETH DMA Rx Desc buffer size.  */
uint32_t ETH_ReadDMARxDescBufferSize(ETH_DMADescConfig_T *DMARxDesc, ETH_DMARXDESC_BUFFER_T buffer)
{
    if(buffer == ETH_DMARXDESC_BUFFER1)
    {
        return (DMARxDesc->ControlBufferSize & ETH_DMARXDESC_RXBS1);
    }
    else
    {
        return ((DMARxDesc->ControlBufferSize & ETH_DMARXDESC_RXBS2) >> ETH_DMARXDESC_BUFFER2_SIZESHIFT);
    }
}