keil_examples/EMAC/EMAC.c
// Keil: function added to initialize Tx Descriptors
function added to initialize Tx Descriptors
function added to initialize Tx Descriptors
void tx_descr_init (void) {
  unsigned int i;
  for (i = 0; i < NUM_TX_FRAG; i++) {
    TX_DESC_PACKET(i) = TX_BUF(i);
    TX_DESC_CTRL(i)   = 0;
    TX_STAT_INFO(i)   = 0;
  }
  LPC_EMAC->TxDescriptor    = TX_DESC_BASE;
  LPC_EMAC->TxStatus        = TX_STAT_BASE;
  LPC_EMAC->TxDescriptorNumber = NUM_TX_FRAG-1;
  LPC_EMAC->TxProduceIndex  = 0;
}
void tx_descr_init ( void ) { unsigned int i ; for ( i = 0 ; i < NUM_TX_FRAG ; i ++ ) { TX_DESC_PACKET ( i ) = TX_BUF ( i ) ; TX_DESC_CTRL ( i ) = 0 ; TX_STAT_INFO ( i ) = 0 ; } LPC_EMAC -> TxDescriptor = TX_DESC_BASE ; LPC_EMAC -> TxStatus = TX_STAT_BASE ; LPC_EMAC -> TxDescriptorNumber = NUM_TX_FRAG - 1 ; LPC_EMAC -> TxProduceIndex = 0 ; }
Keil: function added to initialize Tx Descriptors
Keil : function added to initialize Tx Descriptors
/* Set EMAC Transmit Descriptor Registers. */ /* Tx Descriptors Point to 0 */