/* Packet reception task. 
This task is called when a packet is received. It will pass the packet to the LWIP core. */
static void packet_rx(void *pvParameters)
/* Packet reception task. 
This task is called when a packet is received. It will pass the packet to the LWIP core. */
static void packet_rx(void *pvParameters)
{
        sys_arch_sem_wait(&lpc_enetif->RxSem, 0);
        while (LPC_EMAC->RxConsumeIndex != LPC_EMAC->RxProduceIndex)
            lpc_enetif_input(lpc_enetif->netif);
    }
}