From e13185058d7fdb390de10325a21730ab3b0d3ded Mon Sep 17 00:00:00 2001 From: gdisirio Date: Mon, 26 May 2008 14:57:55 +0000 Subject: [PATCH] git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@309 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- docs/ch.txt | 5 ++++- ports/ARM7-AT91SAM7X/sam7x_emac.c | 16 +++++----------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/docs/ch.txt b/docs/ch.txt index 833e2d2c2..8b00be5d7 100644 --- a/docs/ch.txt +++ b/docs/ch.txt @@ -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. + *
  • Preemptive scheduling.
  • + *
  • 128 priority levels.
  • + *
  • Multiple threads at the same priorily level allowed.
  • + *
  • Round robin scheduling for threads at the same priority level.
  • *
  • Unlimited number of threads.
  • *
  • Unlimited number of virtual timers.
  • *
  • Unlimited number of semaphores.
  • @@ -40,7 +44,6 @@ * runtime. *
  • Blocking and non blocking I/O channels with timeout and events generation * capability.
  • - *
  • Pre-emptive scheduling.
  • *
  • 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.
  • diff --git a/ports/ARM7-AT91SAM7X/sam7x_emac.c b/ports/ARM7-AT91SAM7X/sam7x_emac.c index a8f7bf0a8..e651c411e 100644 --- a/ports/ARM7-AT91SAM7X/sam7x_emac.c +++ b/ports/ARM7-AT91SAM7X/sam7x_emac.c @@ -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; /*