/* Sets up the RX descriptor ring buffers. 
This function sets up the descriptor list used for receive packets. */
static err_t lpc_rx_setup(struct lpc_enetdata *lpc_enetif)
/* Sets up the RX descriptor ring buffers. 
This function sets up the descriptor list used for receive packets. */
static err_t lpc_rx_setup(struct lpc_enetdata *lpc_enetif)
{
    LPC_EMAC->RxDescriptor = (u32_t) &lpc_enetif->prxd[0];
    LPC_EMAC->RxStatus = (u32_t) &lpc_enetif->prxs[0];
    LPC_EMAC->RxDescriptorNumber = LPC_NUM_BUFF_RXDESCS - 1;
    lpc_enetif->rx_free_descs = LPC_NUM_BUFF_RXDESCS;
    lpc_enetif->rx_fill_desc_index = 0;
    lpc_rx_queue(lpc_enetif->netif);
    return ERR_OK;
}