OpenCores
URL https://opencores.org/ocsvn/plasma/plasma/trunk

Subversion Repositories plasma

[/] [plasma/] [trunk/] [kernel/] [ethernet.c] - Diff between revs 375 and 385

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 375 Rev 385
Line 411... Line 411...
 
 
   //Clear receive buffer
   //Clear receive buffer
   for(i = 0; i <= INDEX_MASK; ++i)
   for(i = 0; i <= INDEX_MASK; ++i)
      buf[i] = BYTE_EMPTY;
      buf[i] = BYTE_EMPTY;
 
 
   //Start receive DMA
   if(SemEthernet == NULL)
   MemoryWrite(GPIO0_OUT, ETHERNET_ENABLE);
   {
 
 
   //Setup interrupts for receiving data
 
   OS_InterruptRegister(IRQ_ETHERNET_RECEIVE, EthernetIsr);
 
   if(SemEthernet)
 
      return;
 
   SemEthernet = OS_SemaphoreCreate("eth", 0);
   SemEthernet = OS_SemaphoreCreate("eth", 0);
   SemEthTransmit = OS_SemaphoreCreate("ethT", 1);
   SemEthTransmit = OS_SemaphoreCreate("ethT", 1);
   OS_ThreadCreate("eth", EthernetThread, NULL, 240, 0);
   OS_ThreadCreate("eth", EthernetThread, NULL, 240, 0);
}
}
 
 
 No newline at end of file
 No newline at end of file
 
   //Setup interrupts for receiving data
 
   OS_InterruptRegister(IRQ_ETHERNET_RECEIVE, EthernetIsr);
 
 
 
   //Start receive DMA
 
   MemoryWrite(GPIO0_OUT, ETHERNET_ENABLE);
 
}
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.