git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@309 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
gdisirio 2008-05-26 14:57:55 +00:00
parent 90b16f78c2
commit e13185058d
2 changed files with 9 additions and 12 deletions

View File

@ -24,6 +24,10 @@
* Win32 process and the application code does not need to be aware of it.
* MinGW and VS demos available and ready to go, use them as templates for
* your application.</li>
* <li>Preemptive scheduling.</li>
* <li>128 priority levels.</li>
* <li>Multiple threads at the same priorily level allowed.</li>
* <li>Round robin scheduling for threads at the same priority level.</li>
* <li>Unlimited number of threads.</li>
* <li>Unlimited number of virtual timers.</li>
* <li>Unlimited number of semaphores.</li>
@ -40,7 +44,6 @@
* runtime.</li>
* <li>Blocking and non blocking I/O channels with timeout and events generation
* capability.</li>
* <li>Pre-emptive scheduling.</li>
* <li>Minimal system requirements: about 8KiB ROM with all options enabled and
* speed optimizations on. The size can shrink under 2KiB by disabling the
* the unused subsystems and optimizing for size.</li>

View File

@ -38,13 +38,13 @@ static bool_t link_up; /* Last from EMACGetLinkStatus()*/
static uint8_t default_mac[] = {0xAA, 0x55, 0x13, 0x37, 0x01, 0x10};
BufDescriptorEntry rent[EMAC_RECEIVE_BUFFERS] __attribute__((aligned(8)));
static BufDescriptorEntry rent[EMAC_RECEIVE_BUFFERS] __attribute__((aligned(8)));
static uint8_t rbuffers[EMAC_RECEIVE_BUFFERS * EMAC_RECEIVE_BUFFERS_SIZE] __attribute__((aligned(8)));
BufDescriptorEntry *rxptr;
static BufDescriptorEntry *rxptr;
BufDescriptorEntry tent[EMAC_TRANSMIT_BUFFERS] __attribute__((aligned(8)));
static BufDescriptorEntry tent[EMAC_TRANSMIT_BUFFERS] __attribute__((aligned(8)));
static uint8_t tbuffers[EMAC_TRANSMIT_BUFFERS * EMAC_TRANSMIT_BUFFERS_SIZE] __attribute__((aligned(8)));
BufDescriptorEntry *txptr;
static BufDescriptorEntry *txptr;
#define PHY_ADDRESS 1
#define AT91C_PB15_ERXDV AT91C_PB15_ERXDV_ECRSDV
@ -199,9 +199,7 @@ void InitEMAC(int prio) {
AT91C_BASE_EMAC->EMAC_RSR = AT91C_EMAC_OVR |
AT91C_EMAC_REC |
AT91C_EMAC_BNA; // Clears RSR
AT91C_BASE_EMAC->EMAC_NCFGR |= AT91C_EMAC_CAF |
AT91C_EMAC_NBC |
AT91C_EMAC_DRFCS; // Initial NCFGR settings
AT91C_BASE_EMAC->EMAC_NCFGR |= AT91C_EMAC_DRFCS; // Initial NCFGR settings
AT91C_BASE_EMAC->EMAC_NCR |= AT91C_EMAC_TE |
AT91C_EMAC_RE |
AT91C_EMAC_CLRSTAT; // Initial NCR settings
@ -218,10 +216,6 @@ void InitEMAC(int prio) {
/*
* Waits for auto-negotiation to end and then detects the link status.
*/
/* while (!(phy_get(MII_BMSR) & BMSR_ANEGCOMPLETE))
;
if (!EMACGetLinkStatus())
chDbgPanic("no link");*/
AT91C_BASE_EMAC->EMAC_NCR &= ~AT91C_EMAC_MPE;
/*