/* check if there is something in the Rx FIFO to be retrieved */
if(minic_readl(MINIC_REG_MCR)&MINIC_MCR_RX_EMPTY)
return0;
return0;
if(!RX_DESC_VALID(desc_hdr)){/* invalid descriptor? Weird, the RX_ADDR seems to be saying something different. Ignore the packet and purge the RX buffer. */
hdr_size=0;
//invalid descriptor ? then probably the interrupt was generated by full rx buffer
payload_size=0;
if(minic_readl(MINIC_REG_MCR)&MINIC_MCR_RX_FULL){
/* uint16_t pointers to copy directly 16-bit data from FIFO to memory */
//minic_new_rx_buffer();
ptr16_hdr=(uint16_t*)hdr;
ptr16_payload=(uint16_t*)payload;
/* Read the whole frame till OOB or till the FIFO is empty */