keil_examples/EMAC/EMAC.c
// Keil: function added to initialize Rx Descriptors
function added to initialize Rx Descriptors
function added to initialize Rx Descriptors
void rx_descr_init (void)
{
  unsigned int i;
  for (i = 0; i < NUM_RX_FRAG; i++) {
    RX_DESC_PACKET(i)  = RX_BUF(i);
    RX_DESC_CTRL(i)    = RCTRL_INT | (ETH_FRAG_SIZE-1);
    RX_STAT_INFO(i)    = 0;
    RX_STAT_HASHCRC(i) = 0;
  }
  LPC_EMAC->RxDescriptor    = RX_DESC_BASE;
  LPC_EMAC->RxStatus        = RX_STAT_BASE;
  LPC_EMAC->RxDescriptorNumber = NUM_RX_FRAG-1;
  LPC_EMAC->RxConsumeIndex  = 0;
}
void rx_descr_init ( void ) { unsigned int i ; for ( i = 0 ; i < NUM_RX_FRAG ; i ++ ) { RX_DESC_PACKET ( i ) = RX_BUF ( i ) ; RX_DESC_CTRL ( i ) = RCTRL_INT | ( ETH_FRAG_SIZE - 1 ) ; RX_STAT_INFO ( i ) = 0 ; RX_STAT_HASHCRC ( i ) = 0 ; } LPC_EMAC -> RxDescriptor = RX_DESC_BASE ; LPC_EMAC -> RxStatus = RX_STAT_BASE ; LPC_EMAC -> RxDescriptorNumber = NUM_RX_FRAG - 1 ; LPC_EMAC -> RxConsumeIndex = 0 ; }
Keil: function added to initialize Rx Descriptors
Keil : function added to initialize Rx Descriptors
/* Set EMAC Receive Descriptor Registers. */ /* Rx Descriptors Point to 0 */